=== Lab 6 Cleanup ===

Noticing that in my dropped-object marking pronouns, I was repeating a lot, I added a supertype: 

inanimate_dropped_object_marker := infl-ltol-rule & inanimate_obj_pronoun-lex-rule &
  [ SYNSEM.LOCAL.CAT.VAL.COMPS < [ OPT +, OPT-CS in-foc ] > ].

masc_inanimate_obj_prounoun_verb_prefix-lex-rule := inanimate_dropped_object_marker .

fem_inanimate_obj_pronoun-lex-rule := inanimate_dropped_object_marker .

plur_inanimate_obj_pronoun-lex-rule := inanimate_dropped_object_marker .


=== I can eat glass. It does not hurt me ===

== I can eat glass == 

* Implemented the modal verb "pouvoir" and created a [ FORM infinitive ] :

;;; Form

form := *top*.
nonfinite := form.
finite := form.
past_participle := nonfinite.
infinitive := nonfinite. 

modal-verb-lex := verb-lex & trans-first-arg-raising-lex-item-1 &
  [ SYNSEM.LOCAL.CAT.VAL.COMPS.FIRST.LOCAL [ CAT.HEAD  verb,
                                             CAT.HEAD.FORM infinitive ] ]  .

1SG_aux_pouvoir-aux-lex := arg-comp-aux-with-pred & modal-verb-lex &
  [ SYNSEM.LOCAL.CAT.VAL [ SUBJ.FIRST.LOCAL.CONT.HOOK.INDEX.PNG [ NUM singular,
                                                                  PER 1st ] ] ].
2SG_aux_pouvoir-aux-lex := arg-comp-aux-with-pred & modal-verb-lex &
  [ SYNSEM.LOCAL.CAT.VAL [ SUBJ.FIRST.LOCAL.CONT.HOOK.INDEX.PNG [ NUM singular,
                                                                  PER 2nd ] ] ].

3SG_aux_pouvoir-aux-lex := arg-comp-aux-with-pred & modal-verb-lex &
  [ SYNSEM.LOCAL.CAT.VAL [ SUBJ.FIRST.LOCAL.CONT.HOOK.INDEX.PNG [ NUM singular,
                                                                  PER 3rd ] ] ].

1PL_aux_pouvoir-aux-lex := arg-comp-aux-with-pred & modal-verb-lex &
  [ SYNSEM.LOCAL.CAT.VAL [ SUBJ.FIRST.LOCAL.CONT.HOOK.INDEX.PNG [ NUM plural,
                                                                  PER 1st ] ] ].

2PL_aux_pouvoir-aux-lex := arg-comp-aux-with-pred & modal-verb-lex &
  [ SYNSEM.LOCAL.CAT.VAL [ SUBJ.FIRST.LOCAL.CONT.HOOK.INDEX.PNG [ NUM plural,
                                                                  PER 2nd ] ] ].

3PL_aux_pouvoir-aux-lex := arg-comp-aux-with-pred & modal-verb-lex &
  [ SYNSEM.LOCAL.CAT.VAL [ SUBJ.FIRST.LOCAL.CONT.HOOK.INDEX.PNG [ NUM plural,
                                                                  PER 3rd ] ] ].

peux := 1SG_aux_pouvoir-aux-lex &
  [ STEM < "peux" >,
    SYNSEM.LKEYS.KEYREL.PRED "_can_v_rel" ].

peux_2 := 2SG_aux_pouvoir-aux-lex &
  [ STEM < "peux" >,
    SYNSEM.LKEYS.KEYREL.PRED "_can_v_rel" ].


peut := 3SG_aux_pouvoir-aux-lex &
  [ STEM < "peut" >,
    SYNSEM.LKEYS.KEYREL.PRED "_can_v_rel" ].

pouvons := 1PL_aux_pouvoir-aux-lex &
  [ STEM < "pouvons" >,
    SYNSEM.LKEYS.KEYREL.PRED "_can_v_rel" ].

pouvez := 2PL_aux_pouvoir-aux-lex &
  [ STEM < "pouvez" >,
    SYNSEM.LKEYS.KEYREL.PRED "_can_v_rel" ].

peuvent := 3PL_aux_pouvoir-aux-lex &
  [ STEM < "peuvent" >,
    SYNSEM.LKEYS.KEYREL.PRED "_can_v_rel" ].

It managed to parse sentences correctly, but was also parsing 'Je peux mange..' and 'Il peut mange..' which baffled me.  I thought it was some kind of voodoo with 1SG and 3SG until it hit me as I was falling asleep that 'Je mange' and 'il mange' were licensed as present tense conjugations.  Pondered why my modal-verb-lexeme wasn't enforcing the requirement that its COMP be type infinitive.  As I was typing another "Help!" post to GOPost, it struck me that it wasn't that the FORM infinitive isn't enforced, it was that the present tense conjugations were underspecified for FORM.  Added a FORM value to my present tense conjugation lex rule, and this took care of it:

er_verb_conjugation-lex-rule := inanimate_obj_pronoun-rule-dtr & negation_prefix-rule-dtr & infl-ltow-rule & add-only-no-ccont-rule &
  [ SYNSEM.LOCAL.CAT.HEAD.FORM finite ] & 
  [ DTR er_verb_conjugation-rule-dtr ].

TODO - add this to all my conjugation lex rules.. Or make a conjugation parent and add this to them.  

I also tested its use with and without the infinitive, in matrix clauses, before embedding verbs, and in embedded clauses:

#360 modal with non inf 
Source: author 
Vetted: f
Judgment: u
Phenom: m 
* vous pouvez mange la pomme
* vous pouvez mange la pomme
I.1SG can.non3SG eat.INF
'I can eat the apple'

#361
Source: author
Vetted: f
Judgment: g
Phenom: m 
ils peuvent manger
ils peuvent manger
I.1SG can.non3SG eat.INF
'i can eat' 

#366 Modal over an embedding clause  
Source: author
Vetted: f
Judgment: g
Phenom: m, emb-d
Je peux penser que la fille est petite.
je     peux       pens.er  que  la          fille        est     petite
I.1SG can.non3SG think.INF that the.3SG-fem girl.3SG-fem is.3SG small.SG-fem 
"I can think that the girl is small' 

#367 Modal over an embedding clause without infinitive  
Source: author
Vetted: f
Judgment: u
Phenom: m
* Je peux pense que la fille est petite.
* je   peux       pens.e       que  la          fille        est     petite
I.1SG can.non3SG  think.non2SG that the.3SG-fem girl.3SG-fem is.3SG small.SG-fem 
"I can think that the girl is small' 

#370 Modal inside the embedded clause 
Source: author
Vetted: f
Judgment: g
Phenom: m, emb-d
Le garçon pense que il peut manger le gâteau 
Le           garçon       pens.e       que  il          peut    mang.er le           gâteau
the.3SG-masc boy.3SG-masc think.non2SG that he.3SG-masc can.3SG eat.INF the.3SG-masc cake.3SG-masc 
'the boy thinks that he can eat the cake' 

#371 Modal inside embedded clause without inf: 
Source: author
Vetted: f
Judgment: u
Phenom: m
Le garçon pense que il peut mange le gâteau 
Le           garçon       pens.e       que  il          peut    mang.e le           gâteau
the.3SG-masc boy.3SG-masc think.non2SG that he.3SG-masc can.3SG eat.3SG the.3SG-masc cake.3SG-masc 
'the boy thinks that he can eat the cake' 

* Added the lexical item "verre" (glass):

verre := masc-noun-lex & 
  [ STEM < "verre" >, 
    SYNSEM.LKEYS.KEYREL.PRED "_glass_n_rel" ]. 

* Since French uses the partitive to specify glass as a mass noun, I created a partitive determiner:

partitive-determiner-lex := determiner-lex &
  [ SYNSEM.LKEYS [ KEYREL.PRED "_some_a_rel"] ] . 

masc_partitive_determiner-lex := partitive-determiner-lex & 
  [ SYNSEM.LOCAL.CAT.VAL.SPEC.FIRST.LOCAL.CONT.HOOK.INDEX.PNG [ NUM singular, 
                                                                GEND masc ] ]. 
fem_partitive_determiner-lex := partitive-determiner-lex & 
  [ SYNSEM.LOCAL.CAT.VAL.SPEC.FIRST.LOCAL.CONT.HOOK.INDEX.PNG [ NUM singular, 
                                                                GEND fem ] ].

plural_partitive_determiner-lex := partitive-determiner-lex & 
  [ SYNSEM.LOCAL.CAT.VAL.SPEC.FIRST.LOCAL.CONT.HOOK.INDEX.PNG [ NUM plural ] ]. 

du := masc_partitive_determiner-lex & 
  [ STEM < "du" > ].  

de_la := fem_partitive_determiner-lex & 
  [ STEM < "de", "la" > ]. 

des_partitive := plural_partitive_determiner-lex &
  [ STEM < "des" > ]. 

== It does not hurt me == 

Thus far, all my pronouns have referred to a specific thing, so I had no means to say the "It" in "It does not hurt me..", so I added a demonstrative pronoun lex, 'ça':

demonstrative_pronoun-lex := no-spr-noun-lex &  
 [ SYNSEM.LOCAL.CONT.HOOK.INDEX [ COG-ST activ+fam,
                                  PNG [ NUM singular,
                                        PER 3rd ] ] ] . 

ça := demonstrative_pronoun-lex &
  [ STEM < "ça" >,
    SYNSEM.LKEYS.KEYREL.PRED "_pronoun_n_rel" ].

Looked into its distribution.  As a subject, it's only used on the abstract, or in idiomatic expressions, such as 'ça me fait mal' (it harms me). As an object, it seems to be usable as a demonstrative, perhaps with the same COG-ST as the dropped object prefixes, le-, la-, les- .  I'll verify with my sources, but it seems rather slangy to me.  

#375 
Source: author
Vetted: f
Judgment: g
Phenom: det
Je mange ça.
je mang.e ça 
I.1SG eat.non2SG it.DEM
'I am eating it' 

In generation, I noticed that it ça was unifying with verbs of all PERNUM, so added the PNG stuff, but since I'm not using it in its abstract subject form, I won't be exercising this in my test suite.  


= Negation = 

After a lot of struggle, I finally got my negation prefix rule done: 

negation_ne_prefix-lex-rule := negation_prefix-lex-rule &
  [ C-CONT [ HOOK [ XARG #xarg,
                    LTOP #larg,
                    INDEX #ind ],
             RELS <!  !>,
             HCONS <! !> ],
    SYNSEM [ LKEYS #lkeys,
             LOCAL.CAT  [ VAL [ COMPS [ FIRST [ LOCAL.CAT [ HEAD adv & 
                                                             [ MOD < [ CONT.HOOK [ INDEX #ind,
                                                                                   LTOP #larg ] ] > ] &
                                                             [ KEYS.KEY neg-adv ] ] ] ,  
                                       REST #comps  ]  ,
                                SPR #spr, 
                                SUBJ #subj, 
                                SPEC #spec ] ] ],
  DTR.SYNSEM [ LKEYS #lkeys,
                 LOCAL [ CONT.HOOK [ XARG #xarg,
                                     INDEX #ind,
                                     LTOP #larg ] ,
                         CAT [ HEAD verb,
                               VAL [ COMPS #comps,
                                     SPR #spr,
                                     SUBJ #subj,
                                     SPEC #spec ] ] ] ] ] .

and my pas: 

neg-adv-lex := basic-scopal-adverb-lex &
  [ SYNSEM.LOCAL.CAT [ VAL [ SPR < >,
                             COMPS < >,
                             SUBJ < > ],
                       POSTHEAD +,
                       HEAD [ MOD < [ LOCAL.CAT.HEAD verb,
                                    LIGHT + ] >,
                              KEYS.KEY neg-adv ] ] ].  


Unfortunately, I haven't been able to rule out sentences with one and not the other.  I've added the KEY neg-adv to both in hopes that it will match them up, and I assume, to make sure the 'pas' follows the 'ne', I am going to need to put [ OPT - ] on the first COMP in ne_prefix-lex-rule.  I tried some places, it didn't work, and I'm going to leave well enough alone since I spent the better part of 3 days trying to get this rule in a working form.    


= Dropped Animate Pronouns = 

I've been avoiding these until now, thinking they'd be complicated to do, however I now realize that as dropped objects, they're identical to the inanimate dropped objects (le-, la-, les-).  It's as overt objects that they're hairy (case change to accusative, being used only in the object position).  I haven't implemented them as overt objects as of yet, but I did as dropped:

animate_dropped_object_marker := infl-ltol-rule & inanimate_obj_pronoun-lex-rule &
  [ SYNSEM.LOCAL.CAT.VAL.COMPS < [ OPT +, OPT-CS activ-or-more ] > ] .

;; These don't need any PNG info, since there's no agreement.  If they were reflexives, they would.
1SG_animate_obj_pronoun_prefix-lex-rule := animate_dropped_object_marker .

2SG_animate_obj_pronoun_prefix-lex-rule := animate_dropped_object_marker .

3_animate_obj_pronoun_prefix-lex-rule := animate_dropped_object_marker .

1PL_animate_obj_pronoun_prefix-lex-rule := animate_dropped_object_marker .

2PL_animate_obj_pronoun_prefix-lex-rule := animate_dropped_object_marker .

1SG_animate_obj_pronoun_prefix := 
%prefix (* me-) 
1SG_animate_obj_pronoun_prefix-lex-rule . 

2SG_animate_obj_pronoun_prefix := 
%prefix (* te-) 
2SG_animate_obj_pronoun_prefix-lex-rule . 

3_animate_obj_pronoun_prefix := 
%prefix (* se-) 
3_animate_obj_pronoun_prefix-lex-rule . 

1PL_animate_obj_pronoun_prefix := 
%prefix (* nous-) 
1PL_animate_obj_pronoun_prefix-lex-rule . 

2PL_animate_obj_pronoun_prefix := 
%prefix (* vous-) 
1PL_animate_obj_pronoun_prefix-lex-rule . 

I am having difficulties adding the SPECI + value to them, if that is relevant to personal pronouns used in the object position, which I assume it is.   

= Hurt = 

I had a choice of two ways of saying hurt, '(se) blesser', or 'se faire mal à'.  'se faire mal à' is technically more correct, but would have lead to a lot of extra work to implement.  I considered treating 'se faire mal à' as a single verb lexical item, but the negation would have then placed the 'pas' adverb at the end of that VP, thus making the negative form 'ne me fait mal (à) pas' rather than the correct 'ça ne me fait pas mal'.  I opted to use (se) blesser, which has a bit stronger meaning than 'se faire mal à' according to my sources, but is much easier to implement. :)

blesser := strict-transitive-er-verb-verb-lex & 
  [ STEM < "bless" >,
    SYNSEM.LKEYS.KEYREL.PRED "_hurt_v_rel" ] .

= ça ne me blesse pas = 

As the sentence would be in eloquent French, I've come upon a couple of stumbling blocks: 

1) I didn't get to the step necessary to append multiple prefixes on a verb.  Your Lab 6 comments say that I have to give my neg-lex-rule a dtr value that is a supertype to both the verbs and the pronoun prefix lex rules.  I shall open a GOPost on this sometime after this lab has been submitted!  

2) I also didn't get to implementing overt animate objects, so I couldn't state it as "ça ne blesse pas moi" 

So, if you'll forgive my bad French, it's going to have to be "ça ne blesse pas je!" 

=== Fixing something of our choice ===

The issue with my overt objects parsing with spurious ambiguity was what I chose to fix.  Oddly, in working on generation, I stumbled upon a solution: 

Keeping 
; inanimate_obj_pronoun-no-drop-lex := inanimate_obj_pronoun-no-drop-lex-rule
commented out in lrules.tdl takes care of it, and doesn't affect any of my other parses!  I'm sure I'll find something that it breaks, but in my current test suite, everything is fine!  

Is it considered cheating if you came upon the solution by accident?  :)  I was concentrating more on generation this week.  

=== Current Coverage === 

Positive Items:  229 
Number of items parsed: 214  93.4% parse rate 

Non-parses: 5 instances of -çi and -là 
                   6 instances of multiple verbal prefixes.
                   2 instances of topicalization
                   2 instances of prendre 

Total Number of parses: 353
Cases of ambiguity - My matrix declarative clauses with overt objects no longer parse twice, however, my negated sentences, modals without an overt object, embedded clauses with an overt object.

Negative Items: 152
Number of items parsed: 4  2.63% parse rate 

Total number of parses: 5 
                   2 instances of ne without pas or pas without ne. 
                   1 instance of an ADV appearing after the past participle rather than the verb (2 parses) 
                   1 instance of a conjoined subject and a singular verb 


Baseline test Suite: 

Positive Items: 229
Number of Items parsed: 192   83.84% 

Total number of parses: 382 

Non-parses: 5 instances of -çi and -là 
                   6 instances of multiple verbal prefixes.
                   2 instances of topicalization
                   24 instances of prendre, pouvoir or blesser  

Negative Items: 152 
Number of items parsed: 5  3.29% 

Total number of parses: 9 


=== Generation ===

If I comment out all lex rules but those required to conjugate my er verbs in the present tense, and form sing and plural forms of nouns, I can generate basic SV or SVO sentences in the present tense.  I enter "je mange la pomme" and it generates "est-ce que je mange la pomme ".  If I enter "est-ce que je mange la pomme", it gives me "Je mange la pomme".  It can only do it once before it gives me the lack of space error.  

tried uncommenting out inv-lr - kept getting "no realization" error. 

Trying future perfectives: enter a sentence with the future perfective, and I can enter a SOV sentence with a future perfective and generate its "est-ce" variant back.

Trying past imperfective: uncommented out past imperfective, tried to generate a present tense SOV sentence, got lack of space error. 

Want to throw LKB out the window now.  Are time stamps too much to ask for? 


To generate what little bit it can: 

in lrules.tdl : comment out everything but singular_zero_suffix-lex := singular_zero_suffix-lex-rule.
In irules.tdl : comment out everything but the *_er_-suffix rules.

Enter a simple SVO sentence, like 'Je mange le biscuit' click Generate.  




