Lab 9
Curtis/McHugh
Lakota [lkt]
2013.05.31

# Grammar Cleanup

* We added any missing lexical items needed to handle the MT tasks.

* We also fixed our somewhat misconfigured semi.vpm and lkb/script
  file. One change we needed to make to semi.vpm was a mapping to handle Italian's
  use of non-sg:

  pl <> non-sg 


* We realized that two of our main phrase types, HEAD-OPT-SUBJ-PHRASE
  and SF-RESOLV-PHRASE, were not inheriting from head-compositional, and
  so our semantics were not properly carrying up the semantic head
  daughters. 

* We harmonized _quick_a_rel and neg_rel across our lexicon and both the
  eng and ita lexica.

* We applied Sanghoun's ICONS and SCOPE-ARG fixes to our COMP-HEAD
  phrase types. We also integrated our SF-RESOLV mechanisms with these phrase 
  types. For example, the final comp-head-phrase-scope rule was:

  comp-head-phrase-scope := head-valence-phrase & head-compositional & head-final & unresolved-sf &
    [ SYNSEM phr-synsem-min & [ LOCAL [ CAT [ VAL [ SUBJ #subj,
                                                    COMPS #comps,
                                                    SPR #spr ],
                                              POSTHEAD #ph,
                                              HC-LIGHT #light ],
                                        CONT.HOOK.INDEX #clause ],
                                LIGHT #light ],
      HEAD-DTR.SYNSEM [ LOCAL.CAT [ HEAD verb,
                                    VAL [ SUBJ #subj,
                                          COMPS < #synsem . #comps >,
                                          SPR #spr ],
                                    HC-LIGHT #light,
                                    POSTHEAD #ph ] ],
      NON-HEAD-DTR [ SYNSEM canonical-synsem & #synsem & [ SCOPE-ARG +,
                                                           LOCAL.CONT.HOOK.CLAUSE-KEY #target ],
                     SF-RESOLV na-or-- ],
      C-CONT [ RELS <! !>,
               HCONS <! !>,
               ICONS <! info-str & [ CLAUSE #clause,
                                     TARGET #target ] !> ] ]. 

Note, however, that for some reason our SF-RESOLV mechanism interacts
strangely with the ICONS system, which led to the problem that this rule
works properly:

  comp-head-phrase := basic-head-1st-comp-phrase & head-final & unresolved-sf &
    [ NON-HEAD-DTR [ SF-RESOLV na-or--,
                     SYNSEM.SCOPE-ARG - ] ].

but this corresponding [ SCOPE-ARG + ] rule

  comp-head-phrase-cp := basic-head-1st-comp-phrase & head-final & unresolved-sf &
    [ HEAD-DTR.SYNSEM.LOCAL.CAT.HEAD comp,
      NON-HEAD-DTR [ SYNSEM.SCOPE-ARG +,
                     SF-RESOLV na-or-- ] ].

caused translation to stop working for the clausal verbs with CP
complements. Without the [ SF-RESOLV na-or-- ] constraint, translation
overgenerates by allowing SF-RESOLV-DECL to CP S complements, which is
incorrect. But with the constraint, in these specific instances
translation doesn't work at all. Of note, with the constraint in place
the monolingual parse results in a single, correct parse. We left the
constraint in place, and generally ascribe the problem to the fact that
the SF-RESOLV mechanism is not very well tested and may have some
undesired side effects.

We also modified our postposition lex type to accommodate the ICONS fix:

  postposition-lex := basic-int-mod-adposition-lex &
    [ SYNSEM [ LOCAL [ CAT [ HEAD adp &
                                  [ MOD < [ LOCAL [ CAT.HEAD noun,
	 		                    CONT.HOOK.INDEX #arg ] ] > ],
                        VAL [ SPR < >,
                              SUBJ < >,
                              SPEC < >,
	 		      COMPS < #comp > ],
	 	       POSTHEAD + ], 
	  	    CONT.HOOK [ XARG #arg,
                                 ICONS-KEY.CLAUSE #arg0,
                                CLAUSE-KEY #arg0 ] ],
             SCOPE-ARG - ],
    ARG-ST < #comp &
	     [ LOCAL.CAT [ HEAD noun,
                           VAL.SPR < > ],
                         OPT - ] > ].

  adj-head-int-phrase :+ 
    [ HEAD-DTR.SYNSEM.LOCAL.CONT.HOOK.INDEX #target,
      NON-HEAD-DTR.SYNSEM.LOCAL.CONT.HOOK.CLAUSE-KEY #clause,
      C-CONT.ICONS <! info-str & [ CLAUSE #clause, TARGET #target ] !> ].

* Related to the SF-RESOLV issue above, we also fixed our clausal verb
  types to use the HEAD.MODE / SF-RESOLV mechanism instead of directly
  setting SF. For example,

  prop-clausal-verb-lex := clausal-trans-verb-lex &
    [ SYNSEM.LOCAL.CAT.HEAD.MODE prop-mode ]. 

  (instead of [ CONT.HOOK.INDEX.SF prop ].)

  This ended up not fixing the problem described above, but it is more
  correct and avoids other issues.  


* We also needed to fix our intransitive form of 'eat' in order to 
  accomplish the MT task. Lakota has distinct verbs for 'to eat something' 
  and 'to eat'; we created a lex type that, although intransitive, contributes
  an arg12-ev-relation for the missing object:

itr-dropped-obj-verb-lex := itr-active-verb-lex &
  [ SYNSEM.LOCAL.CONT.RELS <! arg12-ev-relation &
			      [ ARG2 ref-ind &
				     [ COG-ST type-id ] ] !> ].

* We also addressed a discrepency in the semantics of negation. In our
  grammar neg_rel is a verb rather than an adverb (as generated by the
  customization system).  So the index of the sentence was pointing at
  the neg_rel AUX HEAD rather than its complement. To fix this, we
  identified the index of the aux verb with the index of its complement
  and removed norm-hook-lex-item from the chain of inheritence so that
  the verb's index wasn't associated with its arg0.

  The final neg-aux types look like this:

  neg-sem-lex-item := norm-ltop-lex-item & single-rel-lex-item & icons-lex-item.

  neg-subj-raise-aux-with-pred := subj-raise-aux & neg-sem-lex-item & trans-first-arg-raising-lex-item-1.

  neg-aux-lex := neg-subj-raise-aux-with-pred &
    [ SYNSEM.LOCAL [ CAT [ HEAD.FORM negative-form,
                           VAL.COMPS.FIRST.LOCAL [ CAT.HEAD.FORM nonfinite+irrealis-form,
                                                   CONT.HOOK.INDEX #index ] ], 
                     CONT.HOOK.INDEX #index ] ].

* We also had issues with overgeneration due to coordination. Our fix for this was to force
  SF agreement across coordinands:

  s1-top-coord-rule := basic-s-top-coord-rule & apoly-top-coord-rule &
  [ SYNSEM.LOCAL [ CONT.HOOK.INDEX.SF #sf,
		   COORD-STRAT "1" ],
    LCOORD-DTR.SYNSEM.LOCAL.CONT.HOOK.INDEX.SF #sf,
    RCOORD-DTR.SYNSEM.LOCAL.CONT.HOOK.INDEX.SF #sf ].

  This is arguably not actually correct, but this interacts again with the SF / SF-RESOLV
  mechanisms in non-obvious ways that proved resistant to analysis. 


* Translation revealed a problem with our implementation of
  subj-raise-aux: we had previously been constraining agreement between
  the matrix head subject and the clausal complement's subject; however,
  we had failed to account for subj-drop. Our revised rule constrains
  both SUBJs to have the same OPT value:

  subj-raise-aux := aux-lex & trans-first-arg-raising-lex-item &
    [ SYNSEM.LOCAL [ CAT.VAL [ SPR < >,
                               SPEC < >,
                               COMPS < #comps >,
                               SUBJ < #subj &
	  			    [ OPT #opt ] > ],
                     CONT.HOOK.XARG #xarg ],
      ARG-ST < #subj &
               [ LOCAL [ CAT [ HEAD noun,
                               VAL [ SUBJ < >,
                                     SPR < >,
                                     SPEC < >,
                                     COMPS < > ] ],
                         CONT.HOOK.INDEX #xarg ] ],
               #comps &
               [ LOCAL.CAT [ VAL [ SUBJ < [ OPT #opt ] >,
                                   COMPS < >,
                                   SPR < >,
                                   SPEC < > ],
                             HEAD verb ] ] > ].



  An example of this is in the translation for 'I can eat glass':

  žaŋžáŋla eyá yútA-1SgAgt okíhi-1SgAgt
  glass    IDF eat-1SG.AGT can-1SG.AGT 


* Finally, we fixed a problem where mass nouns (e.g.  žaŋžáŋla, 'glass')
  were incorrectly taking definite determiners. The problem was that we
  had incorrectly specified COUNT for the noun lexical types on the HEAD
  rather than the SPR's HEAD. The correct versions are now:

  noun-noun-lex := noun-lex &
    [ SYNSEM.LOCAL [ CAT.VAL.SPR < [ LOCAL.CAT.HEAD.COUNT + ] >,
                     CONT.HOOK.INDEX.PNG.PER 3rd ] ].

  noun-mass-noun-lex := noun-lex &
    [ SYNSEM.LOCAL.CAT.VAL.SPR < [ LOCAL.CAT.HEAD.COUNT - ] > ].

 
# Transfer Rules Instantiated

eng: pronoun-delete-mtr

ita: pronoun-delete-mtr
     make-harm-mtr

# Transfer Rules Developed

TODO none?

# Current MMT Coverage

## English

We currently cover 16 of 19 English sentences.

  1. Dogs sleep.

     Generates one translation.

  2. Dogs chase cars.

     Generates one translation.

   3. I chase you.

      Generates two translations; both legitimate and reflecting the
      ambiguity in number of 'you' in English.

   4. These dogs sleep.

      Generates 5 translations, all legitimate. The variation occurs
      because: 
      (4) the demonstrative 'lená' can appear either prepositionally or
          postpositionally with either of the two definite articles (4) * 
      (1) the demonstrative can occur without a definite article only
          postpositionally

   5. Dogs eat.

      Generates one translation.

   6. I can eat glass.

      Generates one translation.

   7. It doesnt hurt me.

      Generates one translation.

   8. The dogs chase cars.

      Generates 3 translations, all legitimate. The variation occurs
      because the noun can occur with either of the definite articles or
      as a bare NP.

   9. I think that you know that dogs chase cars.

      Does not translate.

      Note that this is the result of including the [ SF-RESOLV na-or-- ] constraint on 
      the NON-HEAD-DTR of comp-phrase-cp (see discussion above). Without this constraint,
      this sentence generates 8 translations, all legitimate. The variation is the result
      of 4 different combinations of the two complementizers, and the ambiguity in number 
      for 'you' in English.

      However, without the constraint, other translations overgenerate with the SF-RESOLV-DECL
      rule applying to all S complements of CPs. We chose here to opt for broader applicability
      than a single more complex sentence.

   10. I ask whether you know that dogs chase cars.

       Does not translate.

   11. Cats and dogs chase cars.

       Generates one translation (for each of the parses in English).

   12. Dogs chase cars and cats chase dogs.

        Generates four translations; 3 are spurious due to the improper
        application of SF-RESOLV-DECL as a coordinand.  This is
        especially confusing because SF-RESOLV-DECL is specified to
        inherit from nocoord. We investigated slightly, but added this
        to the list of things that are wrong with the SF-RESOLV system
        that need deeper investigation and rework.     

   13. Cats chase dogs and sleep.

       Generates one translation.

   14. Do cats chase dogs?

       Generates 2 translations; both are legitimate due to a choice
       between two question enclitics.

   15. Hungry dogs eat.

       Does not translate.

   16. Dogs eat quickly.

       Generates two translations, both are legitimate. The variation occurs because
       adverbs can attach either to the sentence (in sentence-initial position) or to
       the verb (in preverbal position).

   17. The dogs are hungry.

       Generates three translations, all legitimate. The variation occurs
       because the noun can occur with either of the definite articles or
       as a bare NP. 

   18. The dogs are in the park.

       Generates 9 translations; all are legitimate due to having 2NPs,
       each of which can take either of the two determiners or act as a
       bare NP. (3^2 combinations)

   19. The dogs are the cats.    

       Generates 6 parses, all legitimate: 'dogs' ('šúŋka') with either
       of two determiners or as a bare NP, and either with the verb
       'héčha' ('to be of such a kind') or with 'igmú' ('cat') as an
       N-bar predicate. 

## Italian

   We currently cover 12 of 16 sentences in Italian.

    1. Cani dorm-ono

       Generates one translation.

    2. Cani insegu-ono macchine

       Generates one translation.

    3. Ti-insegu-o

       Generates one translation.

    4. Questi cani dorm-ono

      Generates 5 translations, all legitimate. The variation occurs
      because: 
      (4) the demonstrative 'lená' can appear either prepositionally or
          postpositionally with either of the two definite articles (4) * 
      (1) the demonstrative can occur without a definite article only
          postpositionally

    5. Cani mangi-ano

       Generates one translation.

    6. Posso mangi-are il vetro

       Generates 3 translations, all of which are legitimate with respect to the
       Italian, but not with respect to the proper meaning. It generates three
       translations with the three options for definiteness (2 determiners and bare-np)
       while it should be converting to the mass-noun version. We realized this late in
       the process and attempted to fix it using a rewrite rule, but couldn't find a 
       way to strip off the PNG.NUM sg without spinning or breaking a lot of other things.

    7. Non mi-f-a male

       Generates one translation.

    8. I cani insegu-ono macchine

      Generates 3 translations, all legitimate. The variation occurs
      because the noun can occur with either of the definite articles or
      as a bare NP       

    9. Pens-o che sai che cani insegu-ono macchine

       Does not translate.

    10. Domand-o se sai che cani insegu-ono macchine

        Does not translate.

    11. Cani e gatti insegu-ono macchine

        Generates one translation, for one of the parses in Italian.

    12. Cani insegu-ono macchine e gatti insegu-ono cani

        Generates four translations; 3 are spurious due to the improper
        application of SF-RESOLV-DECL as a coordinand.  This is
        especially confusing because SF-RESOLV-DECL is specified to
        inherit from nocoord. We investigated slightly, but added this
        to the list of things that are wrong with the SF-RESOLV system
        that need deeper investigation and rework.
   
    13. Gatti insegu-ono cani e dorm-ono
   
        Generates 8 translations; two are legitimate due to ambiguity
        between 3pl collective and distributive. The remaining 3 pairs
        are due to SF-RESOLV-DECL being improperly applied to a
        coordinand.
        
    14. Gatti insegu-ono cani

        Generates one translation.

    15. Cani affamat-i mangi-ano

        Does not translate.

    16. Cani mangi-ano velocemente

        Generates two translations, both are legitimate. The variation occurs because
        adverbs can attach either to the sentence (in sentence-initial position) or to
        the verb (in preverbal position).


# Gaps in Coverage

We have three main gaps in coverage:

9. Because of the SF-RESOLV problems, and because
   we chose to keep the [ SF-RESOLV na-or-- ] constraint on the
   comp-head-cp phrase, our clausal sentences in both English and
   Italian ('I think that you know that...'; 'Pens-o che sai che...')
   fail to translate. This was the tradeoff for reducing or eliminating
   overgeneration on other, non-clausal CPs.

10. Embedded questions in both English and Italian do not translate. We
    had been unable to implement them in previous labs and did not
    pursue them further for this lab. (A further complication for this
    lab was the problem described above with the SF-RESOLV system and
    constraints; since we could not get them fully working for
    non-question embedding, question embedding seemed even less likely
    to be successful.)

15. Adjectives. Adjectives as such don't exist in Lakota; their role is filled by
    stative verbs. We have elected so far to not implement them; we do not yet have
    a mechanism for making a CP into a subject. 





