# MISC TDL FIXES

We still weren't getting the correct MRS for the following
sentence. We rectified this by identifying the C-CONT.HOOK with the
daughter's HOOK (as suggested by you!).

		Source: author
		Vetted: f
		Judgment: g
		Phenomena: {adverb, word order}
		Gut zingt dos kind.
		Gut zing-t dos kind.
		well sing-1SG DEF.NOM.N child.
		The child sings well.

Another thing we did was finally implement the 'tsi' interrogative
marker. This marker optionally occurs before interrogative clauses,
which are themselves marked through verb initial word order as well as
before subordinate interrogative clauses:


		Source: a:229
		Vetted: t
		Judgment: g
		Phenomena: {Matrix yes-no questions, word order}
		Tsi farshteyt er shpanis?
		Tsi farshtey-t er shpanis?
		whether understand-2SG 2SG.NOM Spanish?
		Does he understand Spanish?

		Source: author based on examples in c
		Vetted: f
		Judgment: g
		Phenomena: {embedded interrogative}
		Ikh freg, tsi iz es efsher
		Ikh freg, tsi iz es efsher
		1SG.NOM ask;3SG, whether;COMP be;3SG 3SG.NOM.N possible.
		I ask whether it is possible?


In order to get this working, we had to change the HEAD of the
daughter of the q-clause-rule to be +vc so that it would accept a comp
headed phrase. This then meant we had to do the same for the root
condition. After this, tsi-initial main clauses parsed fine, however
we were also overgenerating with tsi applying post-clausal. In order
to rule this put, we restricted the comp-head rule to take the head
daughter was headed by a verb.


		q-clause-rule := unary-phrase & interrogative-clause &
		  [ C-CONT.HOOK #hook,
		    SYNSEM.LOCAL.CAT [ MC +,
		                       HEAD #head,
		                       VAL #val ],
		    ARGS < [ SYNSEM [ MODIFIED notmod-or-rmod,
		                      LOCAL [ CONT.HOOK #hook,
		                              CAT [ MC na,
		                                    HEAD #head & +vc & [ FORM finite,
		                                                         MOD < > ],
		                                    VAL #val & [ SUBJ < >,
		                                                 COMPS < >,
		                                                 SPR < >,
		                                                 SPEC < > ] ] ] ] ] > ].



		comp-head-phrase := basic-head-1st-comp-phrase & head-final-head-nexus &
		  [ HEAD-DTR.SYNSEM.LOCAL.CAT.HEAD verb].


With this in place, subordinate interrogatives with tsi were parsing
but getting four parses. It turns out that this was because we had not
constrained the SPEC on the interrogative complementizer lex type to
be empty. We also discovered through playing around with generation
that the head verb of the complement phrase needed to be constrained
to have form finite, otherwise we were getting past participle forms
as the head of the complement clause, which is ungrammatical. We also
constrained the MC of the single argument in ARG-ST to be na, this was
so that we don't end up with multiple applications of the
q-clause-rule rule in the one derivation. The new version of the
complementizer type is below:


		int-comp-lex :=  complementizer-lex-item &
		  [ SYNSEM.LOCAL [ CONT.HOOK.INDEX.SF ques,
		                   CAT.VAL [ COMPS.FIRST.LOCAL.CAT.HEAD.FORM finite,
		                             SPEC < >,
		                             SPR < > ] ],
		    ARG-ST < [ LOCAL [ CAT.MC na,
		                       CONT.HOOK.INDEX.SF ques ] ] > ].


One residual problem is that we are currently getting two parses for
embedded interrogatives such as "Ikh freg, tsi iz es efsher". This is
because the q-clause-rule is not restricted to occurting at the top of
a derivation tree and thus we have one parse includes this rule and
one that does not.


We also noticed that there was some spurious ambiguity with our
determiner lex supertype. We fixed this by changing SUBJ < > to be
SUBJ nonull. This was necessary to prevent articles attaching to
prepositions with the HEAD-SUBJ rule.


		Source: author
		Vetted: f
		Judgment: g
		Phenomena: {cop}
		Der man iz unter dos hoyz.
		Der man iz unter dos hoyz.
		DEF.SG.NOM.M man COP under DEF.SG.ACC.N house.
		The man is under the house.


		determiner-lex-supertype := norm-hook-lex-item & basic-zero-arg &
		  [ SYNSEM [ LOCAL [ CAT [ HEAD det,
					               VAL [ SPEC.FIRST.LOCAL.CONT.HOOK [ INDEX #ind,
						  	 		                                  LTOP #larg ],
		                                 SPR < >,
		                                 SUBJ nonull,
		                                 COMPS < > ] ],
				             CONT.HCONS < ! qeq & [ HARG #harg,
		                                            LARG #larg ] ! > ], 
		             LKEYS.KEYREL quant-relation & [ ARG0 #ind,
		                                             RSTR #harg ] ] ].


# CORPUS SENTENCE

The corpus sentence we chose to parse follows:

		# Nuyorkish un andere zakhn, Shapiro Lamed
		Source: a
		Vetted: f
		Judgment: a
		Phenomena: {}
		di rebitsin iz geven zeyer a narishe yidene.
		di rebitsin iz geven zeyer a narish-e yidene.
		DEF.NOM.F rabbis_wife be;3SG PERF very INDF foolish-ACC.F Jew
		The rabbi's wife has been a very foolish Jew.

In the sentence above "geven" is the past participle form of "zayn"
which means "to be" and it indicates the perfect tense. And "iz" is
being used as an auxiliary verb. We added the following lexicon
entries to get "geven" working corresponding to the two different
kinds of copulars we have implemented previously.

		geven_verb_cop := past-part-copula-verb-lex &
		  [ STEM < "geven" > ].
		
		geven_id_cop := past-part-copula-id-lex &
		  [ STEM < "geven" > ].

In Yiddish "zeyer" is used adverbially to mean "really". In its usage
"zeyer" can be used like other yiddish adverbs to modify adjectives
(occurring to the left of the adjective), but unlike other adverbs it
can also precede a NP beginning with an indefinite article.
	
We created two lexicon entries for "zeyer". The first entry handles
the regular adverbial usage of "zeyer". The second handles the case in
which it attaches to a NP before the `DET` (as shown in the corpus
sentence).

		zeyer_1 := base-adjective-lex & 
			[ STEM < "zeyer" >,
			  SYNSEM.LKEYS.KEYREL.PRED "_very_a_rel"].
	
		zeyer_2 := zeyer-pre-lex & 
			[ STEM < "zeyer" >,
			  SYNSEM.LKEYS.KEYREL.PRED "_very_a_rel"].

The constraints for `base-adjective-lex` we escalated to a new lextype
called `base-adjective-lex-super`. We then created a subtype of the
supertype for "zeyer" called `zeyer-pre-lex`. The `zeyer-pre-lex` type
is used to restrict the application of `adverb-pre-det-lex-rule` to
just the "zeyer" lexicon entry via its `DTR`. The rule allows "zeyer"
to behave like an adverb but makes it so that it doesn't require
inflection by passing up the `DTR` ("zeyer") constraints and adding
`INFLECTED.ADJ-FLAG +`.

When we initially implemented the `adverb-pre-det-lex-rule` rule, it
caused the `head-opt-comp-phrase` to spin and the LKB would run out of
edges while attempting to parse. We added the
`SYNSEM.LOCAL.CAT.VAL.COMPS < >` to stop the `head-opt-comp-phrase`
from being applied. After these additions, the corpus sentence parsed
with a single tree. Our implementation is not specific to indefinite
articles and thus over-generates, permitting "zeyer" to attach to noun
phrases beginning with a definite article.

		base-adjective-lex-super := norm-sem-lex-item & 
		 [ SYNSEM [ LOCAL [ CONT.HOOK.XARG #xarg,
		            CAT.VAL [ SPR < >,
		                      SUBJ < >,
		                      COMPS < >,
		                      SPEC < > ]],
		            LKEYS.KEYREL event-relation & [ ARG1 #xarg ]],
		   INFLECTED.ADJ-FLAG - ].

		base-adjective-lex := base-adjective-lex-super.

		zeyer-pre-lex := base-adjective-lex-super.

		adverb-pre-det-lex-rule := const-lex-rule & add-only-no-ccont-rule & 
		  [ SYNSEM.LOCAL.CAT.HEAD adv & [ MOD < [ LOCAL.CAT [ HEAD noun,
		                                                    VAL [ SUBJ < >,
		                                                          COMPS < >,
		 														  SPR < >,
																  SPEC < > ] ] ] > ],
		    SYNSEM.LOCAL.CAT.VAL.COMPS < > ,
			INFLECTED.ADJ-FLAG +, 
		    DTR zeyer-pre-lex ].
		

The MRS for the test sentence is partially correct. The predicate
introduced by the copula "geven" is working correctly, however we
currently do not have the pre-article "zeyer" working
correctly. Instead of modifying the adjective, "zeyer" is modifying
the exist_q_rel introduced by the object.

We added the following sentences to test our implementation of "zeyer":

		Source: author
		Vetted: f
		Judgment: g
		Phenomena: {adverb}
		Dos kind zingt zeyer shayn.
		Dos kind zing-t zeyer shayn.
		DEF.ACC.N child sing-1SG very nicely.
		The child sings very nicely.

		Source: author
		Vetted: f
		Judgment: u
		Phenomena: {adverb}
		Dos kind zingt gut shayn.
		Dos kind zing-t gut shayn.
		DEF.ACC.N child sing-1SG well nicely.
		The child sings good nicely.

		Source: YMC
		Vetted: f
		Judgment: g
		Phenomena: {adverb}
		di rebitsin iz zeyer a narishe yidene.
		di rebitsin iz zeyer a narish-e yidene.
		DEF.NOM.F rabbis_wife be;3SG very INDF foolish-ACC.F Jew
		The rabbi's wife is a very foolish Jew.

		Source: YMC
		Vetted: f
		Judgment: g
		Phenomena: {adverb}
		di rebitsin iz a zeyer narishe yidene.
		di rebitsin iz a zeyer narish-e yidene.
		DEF.NOM.F rabbis_wife be;3SG very INDF foolish-ACC.F Jew
		The rabbi's wife is a very foolish Jew.

		Source: author
		Vetted: f
		Judgment: u
		Phenomena: {adverb}
		di rebitsin iz zeyer di narishe yidene.
		di rebitsin iz zeyer di narish-e yidene.
		DEF.NOM.F rabbis_wife be;3SG very DEF.ACC.M foolish-ACC.F Jew.
		The rabbi's wife is the very foolish Jew.


# FIXES FOR GETTING TRANSLATION TO WORK

Once we had turned on the semi VPM and overcome the various problems
in the LKB script file and the mrsglobals.lsp file, these are the
following changes we needed to get "Dogs sleep" to translate into
Yiddish dogs hunt.

Firstly, we needed to normalize the names used for the PNG.PER
feature. The English grammar uses 'first', 'second' and 'third',
whereas Matrix grammars use '1st', '2nd', and '3rd'. To resolve this
we used semi.vpm. to change '1st' etc into 'first' etc on the external
grammar side like so:

		PNG.PER : PNG.PER
		  1st <> first
		  2nd <> second
		  3rd <> third
		  * <> !

Once we made this fix, we were able to translate from "Dogs
sleep". Into various permutations of "Hunts shlofn" in Yiddish. In
addition to various plural forms being realized (which we expect,
since we do not yet constrain plural noun suffixes to apply only to
the nouns on which they occur) we were also at this point seeing the
auxiliary 'nemen' appearing in realizations. This is due to the fact
that 'nemen' constructions indicate the habitual aspect, and the MRS
we were receiving from the English grammar were coming in with aspect
underspecified, and were thus allowing realizations to be generated
that applied a specific aspect. In order to fix this, we added a new
type 'no-aspect' which inherits from aspect, and made this the
'default' aspect for when an aspect came in from an external grammar
that did not match any of the aspects our grammar currently
implements.  This was achieved via modifying `semi.vpm` as below.

E.ASPECT : ASPECT
  perfective <> perfective
  inchoative <> inchoative
  habitual <> habitual
  no-aspect << [e]
  * <> !

We also noticed a spurious rule in `semi.vpm` generated by the Matrix
that was permitting the E.TENSE feature to remain in the MRS when it
was no longer needed. This was removed.

E.TENSE : E.TENSE
  * <> *

Once all this was done we were able to translate "Dogs sleep" into
Yiddish.



# [incr tsdb()] RESULTS

		Total items:            228
		Positive items:         150
		Negative items:          78
		Parsing positive items:  84
		Parsing negative items:  11 
		Coverage:                56%
		Overgeneration:          14.1%

Competence Comparison from lab8 baseline to current state:

		Prev: 48.7  
		New:  56.0
