GRAMMAR CLEANUPS
===========================

When we started this lab we noticed that we were generating many
different kinds of plural forms. This is because Yiddish has indeed
many different plural suffixes and with a number of these implemented
as suffixes not conditioned on particular words, they were being
generated all over the place. To 'fix' this we changed the 'output' of
our hypothetical morphological analyzer such that all plural suffixes
were regularized to -s. We then updated the segmented morph line
accordingly and generated a new test suite and baseline. This also
highlighted that the limited case morphology on nouns that Yiddish
does have and which overlaps with plural suffix forms was (obviously
in hindsight) being treated everywhere as plural suffixation by our
parser. This allowed us to tweak the analysis such that case marking
suffixes applied before number marking suffixes.

Once the alternative plural forms were removed, we could see that
the case marking was functioning correctly and then the ungrammatical
test cases for case marking on nouns stopped parsing (as they should).


GRAMMAR HARMONIZATION ===========================

We harmonized the predicate names across all three grammars conflating
adverb and adjective predicates into the same form. For example
"_quickly_r_rel" became "_quick_a_rel" in Italian and English. This is
because in Yiddish uninflected adjectives can be used predicatively or
as adverbs, and we have implemented it such that adverbs and
adjectives are derived from the same base form.

We also had to normalize pred values for the neg_rel, exist_rel and
pronoun predicates.


ENGLISH SENTENCES
============================

1. 
Sentence:       Dogs sleep.
Realizations:   1 :)

2. 
Sentence:       Dogs chase cars. 
Realizations:   2
Comments:       Ambiguity is due to topicalized word order (x2).

3.
Sentence:       I chase you.
Realizations:   4
Comments:       Ambiguity is due to topicalized word order (x2) and multiple 
                forms of second person pronoun (x2).
                
4. 
Sentence:       These dogs sleep.
Realizations:   1 :)
Comments:       We previously did not have any proximal demonstratives 
                implemented. This was because Yiddish's primary method of
                indicating a proximal demonstrative is through the use of 
                stress on the determiner. We looked further and found that there
                is also a -o suffix on determiners for emphasizing proximal
                demonstratives, and implemented this as a new set of 
                demonstratives with proximal+dem_a_rel as the ALTKEYREL PRED.

5. 
Sentence:       Dogs eat.
Realizations:   1 :)

6. 
Sentence:       I can eat glass.
Realizations:   16 :(
Comments:       Initially we were getting past-participle forms of the
                matrix verb. This turned out to be because the
                past-participle form was incorrectly inheriting from
                finite.

                Aside from the problematic word orders (some of which
                are clearly ungrammatical, and some we do not have the
                data to tell -- discussed further in the Italian
                version of this sentence), the other issue we are
                having with this sentence is that the indefinite
                article is being inserted incorrectly. We think this
                is caused by the fact that indefinite articles have
                COG-ST type-id which is underspecified (and then
                interacting with the change we made to make articles
                appear if they their relevant cognitive status marking
                were present in the input sentence.) An analysis of mass
                nouns might have helped here too! 

7. 
Sentence:       It doesnt hurt me.
Realizations:   6 
Comments:       Ambiguity is due to multiple forms of the third person 
                pronoun (x3) and topicalization word order (x2). 
                

8. 
Sentence:       The dogs chase cars.
Realizations:   2
Comments:       Ambiguity is due to topicalized word order (x2).

                In order to get the definite determiner appearing in
                the translation we had to modify the bare-np-phrase
                rule have its COG-ST to be type-id. We then had to
                create an alternate rule for pronouns. This is shown
                below. We needed a quick fix for this, and we are
                aware that it is better to avoid types in the
                daughters of phrasal rules.

                bare-np-phrase := basic-bare-np-phrase &
                  [ C-CONT.RELS <! [ PRED "exist_q_rel" ] !>,
                    SYNSEM.LOCAL.CONT.HOOK.INDEX.COG-ST type-id ].

                bare-np-pro-phrase := basic-bare-np-phrase &
                  [ C-CONT.RELS <! [ PRED "exist_q_rel" ] !>,
                    HEAD-DTR pers-pro-lex ].


9.
Sentence:       I think that you know that dogs chase cars.
Realizations:   4
Comments:       Ambiguity is due to multiple forms of 2nd person pronoun (x2),
                and topicalization word order (x2).

                When we began, we were getting many realizations for
                this sentence --possibly around 30. One bug we
                discovered was that the first argument of complement
                clause taking verbs was not being restricted to
                nominative as we had forgotten to do this when
                implementing these new subcat frames. We fixed this by
                creating a new type nom-verb-lex illustrated below,
                which we could then apply to verb-comp-lex and
                copula-verb lex, which was also deficient in this way.

                nom-verb-lex := verb-lex &
                  [ ARG-ST.FIRST.LOCAL.CAT.HEAD noun &
                                                [ CASE nom ] ].

                We found that we were also getting interrogative word
                order appearing in declarative embedded clauses. In
                order to correct this we made the complement of
                verb-comp be MC + and then made the head-comp-cp have
                its MC value be bool and identified it with its head
                daughter. Then after making the complementizers set
                their their own MC to be - for declatative and + for
                interrogative, this allowed for us to distinguish
                between the interrogative and declarative complement
                markers.

                head-comp-phrase-cp := basic-head-1st-comp-phrase & head-initial &
                  [ SYNSEM.LOCAL.CAT.MC bool & #mc,
                    HEAD-DTR.SYNSEM.LOCAL.CAT [ MC #mc,
                                                HEAD comp ],
                    NON-HEAD-DTR.SYNSEM.SCOPE-ARG + ].

                We are currently not generating the realization that has
                the declarative complementizer appearing in the
                embedded clause, we still need to implement this.

10. 
Sentence:       I ask whether you know that dogs chase cars.
Realizations:   8
Comments:       Once again this sentence shows us a range of different 
                topicalizations, which more data is required to determine
                their grammaticality.

                For this sentence we were now getting declarative word
                order in embedded interrogative clauses. This time we
                had to split up the MC value of the complement of
                verb-comp-lex according to the type: bool for
                verb-prop-comp and na-or-- for verb-ques-comp, so that
                it would either accept verb initial clauses (na) or
                interrogative complementizer headed verb initial
                clauses (-).  The interrogative complementizer was
                itself then set to MC bool so that it could either
                head a main clause, or be picked up a verb-ques-comp.

                verb-prop-comp-lex := verb-comp-lex &
                  [ ARG-ST.REST.FIRST.LOCAL [ CAT.MC bool,
                                              CONT.HOOK.INDEX.SF prop  ] ].

                verb-ques-comp-lex := verb-comp-lex &
                  [ ARG-ST.REST.FIRST.LOCAL [ CAT.MC na-or--,
                                              CONT.HOOK.INDEX.SF ques ] ].
 

                We are currently not generating the realization that has
                the interrogative complementizer appearing in the
                embedded clause, we still need to implement this.

11. 
Sentence:       Cats and dogs chase cars.
Realizations:   2
Comments:       Ambiguity is due to topicalized word order (x2)
                
                We also found that the NP coordination rule was not
                constraining its mother to be of any particular number
                or person. We set the number to pl, and just so that
                we weren't getting any further ambiguity with this we
                set the person to 3rd. This needs proper handling later on.

                np2-top-coord-rule := basic-np-top-coord-rule & apoly-top-coord-rule &
                  [ SYNSEM.LOCAL [ CONT.HOOK.INDEX.PNG [ NUM pl,
                                                         PER 3rd ],
                                   COORD-STRAT "2" ] ].

12. 
Sentence:       Dogs chase cars and cats chase dogs.
Realizations:   800 :(
Comments:       Well. This is a bit sad. We are getting past participle forms
                popping up everywhere. It looks like this might be that the
                finite form of the verb in second conjunct might be somehow
                permitting the past-participle form. We unfortunately 
                ran out of time to finish debugging this. The other fix
                that could help here is insisting that sentential conjuncts
                both be MC +, but it's not clear if this will be sweeping things
                under the rug. 

13. 
Sentence:       Cats chase dogs and sleep.
Realizations:   50 :(
Comments:       Same problems as the previous sentence but on a smaller scale.

14. 
Sentence:       Do cats chase dogs?
Realizations:   4
Comments:       Ambiguity is due to topicalized word order (x2) and optional
                interrogative marker (x2)

15. 
Sentence:       Hungry dogs eat.
Realizations:   1 :)

16. 
Sentence:       Dogs eat quickly.
Realizations:   2
Comments:       Ambiguity is due to topicalized word order (x2).

17. 
Sentence:       The dogs are hungry.
Realizations:   3
Comments:       The multiple realizations are due to some overgeneration that
                we accidentally introduced. It seem that it is no longer
                uninflected pred-adj-lex that is being restricted to being the 
                complement of copulas but now inflected adjectives are permitted.
                We only just noticed this and will have to fix this.
                
                We also had to add a trigger rule for the copula which simply
                detects the presence of an adj-like relation in the MRS. 
                Currently we only have this one hooked up, and need to extend
                this to the full paradigm of zayn forms detecting the 
                correct person and number.

                zaynen_2_gr := arg0e_gtr &
                  [ CONTEXT.RELS <! [ PRED "~.*_[ap]_" ] !>,
                    FLAGS.TRIGGER "zaynen_cop_2" ].

18. 
Sentence:       The dogs are in the park.
Realizations:   Stack overflow :(
Comments:       We think the problem is to do with the trigger rule, however
                when we change the above trigger rule to fire on PRED "~.*_ap_",
                the stack overflow goes away and we end up with no realizations.
                Perhaps the [] regexp notation within the string being matches
                is not working. According to the DELPH-IN wiki, regular expressions
                are supported in the PRED feature, but maybe not this specific
                syntax?

19. 
Sentence:       The dogs are the cats.
Realizations:   2
Comments:       Ambiguity is due to topicalized word order x2.


ITALIAN SENTENCES
==================

1.
Sentence:       Cani dorm-ono.
Realizations:   1 :)

2.
Sentence:       Cani insegu-ono macchine
Realizations:   2 :)
Comments:       Ambiguity is due to topicalized word order x2.

3.
Sentence:       Ti-insegu-o.
Realizations:   2 :)
Comments:       Ambiguity is due to topicalized word order x2.

                For this sentence, we had to instantiate the following
                transfer rules to handle the subject and object drop
                in Italian which isn't present in Yiddish. This made it so
                that arg1 and arg2 were dropable:

                pro-insert-arg1 := pro-insert-arg1-mtr.
	            pro-insert-arg2 := pro-insert-arg2-mtr.
	
                What follows is the input MRS for the Italian sentence:

	            h1 e2 {tense aspect prop-or-ques}
	            {h3: _chase_v_rel(e2, x4{ first sg in-foc }, x5{ second sg in-foc })}
	            {}

                We saw that the entities corresponding to arg1 and
                arg2 were missing from the MRS which lead us to
                instantiate the transfer rules.

4.
Sentence:      Questi cani dorm-ono.
Realizations:  1 :)

5.
Sentence:      Cani mangi-ano.
Realizations:  1 :)

6.
Sentence:      Posso mangi-are il vetro
Realizations:  4 :(
Comments:      One of the realizations is ungrammatical due to the verb-initial
               word-order. The others may be grammatical but we are not sure what
               word-orders are licensed by Yiddish when a modal like "ken" is
               used. For example, we're not sure if it's alright to have the
               matrix verb in clause-final position.

7.
Sentence:      Non mi-f-a male
Realizations:  18 :(
Comments:      We're getting 18 sentences due to three factors. We get x2 word
               orders for "vey" due to topicalization. Theres an issue with our
               indefinite determiners being added where they're not suppose to be
               which results in x3 realizations, one without an article, one
               with "an" and one with "a". The gender is underspecfied which
               results in x3 possible generations. These ambiguities compound
               on one another to produce the 18 realizations.

8.
Sentence:      I cani insegu-ono macchine
Realizations:  2 :)
Comments:      Ambiguity is due to topicalized word order x2.

9.
Sentence:      Pens-o che sai che cani insegu-ono macchine
Realizations:  2 :)
Comments:      Ambiguity is due to topicalized word order x2.

10.
Sentence:      Domand-o se sai che cani insegu-ono macchine
Realizations:  4 :)
Comments:      Ambiguity is due to topicalized word order x2 for "oyto-s".
			   There are two additional word orders where topicalization
			   results in results in "du" in the clause-final position. We're
			   not sure if this is a grammatical word order but it seems to work.

11.
Sentence:      Cani e gatti insegu-ono macchine
Realizations:  2 :)
Comments:      Ambiguity is due to topicalized word order x2. "Hunt-s un kats-s"
			   goes to sentence initial.

12.
Sentence:      Cani insegu-ono macchine e gatti insegu-ono cani
Realizations:  800 ;(

13.
Sentence:      Gatti insegu-ono cani e dorm-ono
Realizations:  400 ;(


14.
Sentence:      Gatti insegu-ono cani
Realizations:  2 :)
Comments:      Ambiguity is due to topicalized word order x2. The word "hunt-s"
			   gets topicalized.

15.
Sentence:      Cani affamat-i mangi-ano
Realizations:  1 :)

16.
Sentence:      Cani mangi-ano velocemente
Realizations:  2 :)
Comments:      Ambiguity is due to topicalized word order x2. The word "gikh"
			   gets topicalized.


