This will fix a bug in negation for anyone with negation expressed as an adverb. Everyone should update. Run a testsuite before and after to make sure nothing broke... Here's the new matrix.tdl.
This lab asks you to do two things: First, do some spring cleaning on your grammar.
Second, you will be assigned one other grammar from the class and given the task of making transfer rules so that you can translate from your language to that language. The class will be divided into two groups of two and one group of three. Within each group, you should decide a deadline for exchanging you cleaned-up grammars (I suggest Saturday noon). You will also need to communicate with each other to answer questions about your grammars.
Note that you'll want to take notes of what you're doing along the way to facilitate doing the write up of this part.
You should include before and after snapshots of your grammar's performance on your test suite.
Check generation across a variety of examples, to make sure it works everywhere.
It's difficult for me to anticipate in advance what the remaining differences in semantics are going to be. These instructions therefore tell you how to get started playing with the system and then ask you to post to EPost as soon as you find interesting differences, so we can work them out together!
First, try running the translation system, to see if things work off the shelf.
(lkb-pathname (this-directory) "transfer.tdl")
(lkb-load-lisp (this-directory) "mt.lsp" t) (mt:read-transfer-rules (list (lkb-pathname (this-directory) "567.mtr")) "567 transfer rules" :filter nil)
(setf *translate-grid* '(0 1))
(setf *translate-grid* '(1 0))
If the above steps produce output in the target language, try a few more input sentences to see if you can find any ones that *won't* translate. (Stick with the shared vocabulary, of course.)
If the above do *not* produce output in the target language, it's time to explore why. First, load your own grammar in both LKBs. See if you can translate from your language to itself. If that doesn't work, post to EPost :-) If it does, it's time to explore the differences between the grammars.
Ask the author of your target grammar how you would expect the sentence to be. Parse it, and compare the MRS to the transfer outputs generated. Post to EPost with the differences, and we will work out whether they should be handled by a transfer rule or some other way.
To go from a language with pronouns to one with prodrop, you need to squash the pronouns. This is pretty easy. In 567.mtr, definte a transfer rule like this:
pro-drop-omtr := monotonic_omtr & [ INPUT [ RELS <! [ PRED "_pronoun_n_rel", LBL #larg, ARG0 #x ], [ PRED "_exist_q_rel", LBL #harg, ARG0 #x ] !>, HCONS <! [ HARG #harg, LARG #larg ] !> ], OUTPUT [ RELS <! !>, HCONS <! !> ]].
To insert pronoun relations if your source has prodrop and your target doesn't,it's a little more subtle. This appears to work (again in 567.mtr):
pro-insert-arg1-omtr := monotonic_omtr & [ INPUT.RELS <! !>, CONTEXT.RELS <! [ ARG1 ref-ind & #x ] !>, FILTER.RELS <! [ ARG0 #x ] !>, OUTPUT [ RELS <! noun-relation & [ PRED "_pronoun_n_rel", ARG0 #x, LBL #larg ], quant-relation & [ PRED "_exist_q_rel", ARG0 #x, RSTR #harg ] !>, HCONS <! qeq & [ HARG #harg, LARG #larg ] !> ], FLAGS.EQUAL < #x > ].
To get this to work, you need to edit tdl/transfer.tdl so that the definition of the type flags has a feature called EQUAL instead of UNIQUE.
To replace a more specific demonstrative predicate with a more general one, you'll need to write two rules (to keep things from spinning). The first changes the pred and puts in an extra marker relation. The second, loaded in a separate step, erases the marker pred.
First, you need to create a second .mtr file and load it. Edit lkb/script to add a second mt:read-transfer-rules declaration, which loads 567-2.mtr (instead of 567.mtr). Be sure this is after the first one.
Now add a couple of new types to the bottom of lkb/transfer.tdl:
marker-pred := predsort. dem-rule-pred := marker-pred.
Now define the first rule in lkb/567.mtr:
dem-gen-omtr := monotonic_omtr & [ INPUT.RELS <! [ PRED proximal+dem_a_rel, LBL #h, ARG1 #x ] !>, OUTPUT.RELS <! [ PRED proximal+dem_a_rel, LBL #h, ARG1 #x ], [ PRED dem-rule-pred, ARG0 #x ] !>, FILTER.RELS <! [ PRED dem-rule-pred, ARG0 #x ] !> ].
And finally, the clean-up rule in lkb/567-2.mtr:
clean-up-mtr := monotonic_mtr & [ INPUT.RELS <! [ PRED marker-pred ] !>, OUTPUT.RELS <! !> ].