Lab 8
Writeup
Gracheva, Suskic


						FIXES FROM LAB 7 to LAB 8

1. Semantics for “Kniga na stole”

In Lab7 Grammar, sentence “Kniga na stole” was not generating the correct MRS, i.e. the on predication was not 
correctly identifying the book as the thing on the table. We made two changes to the grammar to fix this: 
we changed the the supertype for the adpositon-lex-item to norm-lex-item and we connected the SUBJ and COMPS 
of the adposition to its ARG-ST, while identifying the ARG1 of the predication with the INDEX of the SUBJ and 
the ARG2 of the predication with the INDEX of the COMPS:

pred-adposition-lex := basic-adposition-lex & norm-sem-lex-item & 
  [ SYNSEM [ LOCAL [ CAT [ HEAD.MOD < >,
                           VAL [ SUBJ < #subj & [ LOCAL.CONT.HOOK.INDEX #xarg ] >,
                                 COMPS < #comps >,
                                 SPR < >,
                                 SPEC < > ]],
                     CONT.HOOK.XARG #xarg ],
             LKEYS.KEYREL [ ARG1 #xarg,
                            ARG2 #arg2 ]],
    ARG-ST < #subj ,
             #comps & [ LOCAL.CONT.HOOK.INDEX #arg2 ] > ]. 

location-adposition-lex := pred-adposition-lex &
	[ INFLECTED +,
	  SYNSEM.LOCAL.CAT [ HEAD [ PRD + ],
			     VAL [ COMPS < [ OPT -,
					     LOCAL.CAT [ HEAD noun & [CASE pre ],
							 VAL [ SPR < >,
							       COMPS < >,
							       SUBJ < > ]]] >,
				   SUBJ < [ LOCAL.CAT [ HEAD noun & [ CASE nom ],
						        VAL [ SPR < > ,
							      COMPS < >,
							      SUBJ < > ]]] > ]]].

2. Overgeneration for "Ja mogu estj steklo"

In Lab 7 we were getting four parses for "Ja mogu estj steklo". We reduced this down to two parses by 
restricting the decl-cl to have saturated SUBJ and COMS on the daughter:

decl-cl := head-only & declarative-clause & same-ynq-unary-phrase &
  [ SYNSEM.LOCAL.CAT [ VAL #val,
                       MC bool ],
    HEAD-DTR.SYNSEM [ LOCAL.CAT [ MC na,
                                  VAL #val & [ SUBJ < >,
					       COMPS < > ],
				  HEAD +vj ],
                      NON-LOCAL.YNQ 0-dlist ]].




							LAB 8

1.  REPRESENTATIONS

We added information structure feature INFO-STR and set up its possible values in russian.tdl:

	; Information structure feature 

	individual :+ [ INFO-STR info-str ].

	info-str := *top*.
	marked := info-str.
	unmarked := info-str.
	topic := marked.
	focus := marked.



2.   ADDING INFORMATION-STRUCTURE MARKING CONSTRUCTIONS

For Russian there are different strategies of marking topic/focus.  

One of the possibilities is the WORD ORDER: 
the element in the sentence-initial position can be analyzed as topic and the element in sentence-final position
(or object in the sentence-final position per other source) as focus introducing the new information (with the 
neutral intonation).  

Another interesting marking topic/focus strategy in Russian is PREDICATE CLEFT CONSTRUCTION:

	Kupitj(-to)      Ivan      sobaku    kupil,            no    guljatj   s     nej  on      ne  hodit.
	Buy.INF(-clitic) Ivan.NOM  dog.ACC   buy.PST.SG.MASC   but   walk.INF  with  her  he.NOM  not go.3SG.PRS.
	Ivan did buy-FP a dog, but he doesn't go to walk with her.  

Here the infinitive form of the verb that is in focus is repeated in the sentence-initial position, with 
"-to" clitic attaching optionally.  I think though that predicate clefting can be analyzed both as giving
focus status to the verb and to the entire sentence (I didn't see it in any of the sources, but it would be
interesting to research in more detail).  Cleft constructions are outside the scope of this lab, so we are 
not modeling it for Lab 8.  

Even though word order can be indicative of topic/focus, the “emphatic stress” (“focus prosody” in Lab 8 
terminology) overrides the word order.  This makes any position in the sentence capable of bearing the status 
of focus (even if it occupies the position typical for topic).  Therefore we modeled these two strategies for 
marking topic/focus for Lab 8:

   1). Focus topic clitics (“li” is marking Focus position) for yes-no questions.
   2). Focus prosody for declarative sentences.  



1a.	FOCUS CLITIC "LI" IN YES-NOW QUESTIONS

In Russian interrogative yes-no questions clitic "li" is placed in the second position and indicates that the
preceding word in this sentence bears focus status.  

Right now the sentence "Spit li ivan", and in particular the VP "spit li" is licensed by Head-Adj-Int-Rule, 
which is defined in matrix.tdl as follows:

	head-adj-int-phrase := head-adj-phrase & isect-mod-phrase.

Thus, since "li" is a modifier modifyng the word on the left of it, we had to modify the MOD list of the 
question-clitic to get the modifier "li" to combine with the head by constraining the INDEX.INFO-STR value 
of the element that "li" modifies to be "focus". 



CLITICS ATTACHING TO NON-VERBS

When clitic attaches to any part of speech except the V, we get narrow focus:

   Sobaku li kupil Ivan? 
   Did Ivan buy the DOG?  (narrow focus on "DOG")  
  
   Ivan li kupil sobaku? 
   Did IVAN buy the dog?  (narrow focus on "IVAN")

So we are modeling it with the entry for clitic that modifies any host and constrains the INFO-STR of that 
host to be "focus".  So we added a new lexical entry for "li" in lexicon.tdl:

     li := focus-question-clitic-lex &
       [ STEM < "li" > ].

We put the following in the russian.tdl:

   ;;Question-clitic attaching to non-verbs constrains the INFO-STR value of the element it modifies to "focus".

   focus-question-clitic-lex := no-hcons-lex-item  &
    [ SYNSEM [ LOCAL [ CAT [ VAL [ SPR < >, COMPS < >, SUBJ < >, SPEC < >],
                                           HEAD adv &
                                                   [ MOD < [ LIGHT +,
                                                             L-PERIPH +,
                              				     LOCAL intersective-mod &
                               				     [ CONT.HOOK.INDEX.INFO-STR focus]] > ]],
                                CONT.RELS <! !> ],
                	         NON-LOCAL.YNQ <! *top* ! > ] ]. 


SEMANTICS: now when we parse the sentence "Ivan li spit" we get [INFO-STR focus] on N "Ivan".  




CLITICS ATTACHING TO VERBS

When clitic attaches to the V, we get ambiguity (focus can be only on the verb or it can be on the whole
sentence): 

   KUPIL li Ivan sobaku?  
   Did Ivan BUY the dog?  (narrow focus - emphatic stress on "KUPIL")

   Kupil li Ivan sobaku?  
   Did Ivan buy the dog?  (whole-sentence focus (no emphatic stress on any particular word)

This we're modeling with the entry for clitic that modifies only verbs and doesn't constrain INFO-STR. 
Right now our "li" lexical entry inherits from question-clitic-lex in russian.tdl which does exactly that:


       li := question-clitic-lex &
         [ STEM < "li" > ].

Since we already had  this in the russian.tdl:

question-clitic-lex := no-hcons-lex-item  &
 [ SYNSEM [ LOCAL [ CAT [ VAL [ SPR < >, COMPS < >, SUBJ < >, SPEC < >],
                                        HEAD adv &
                                                [ MOD < [ LOCAL.CAT.HEAD verb,
						      	  LIGHT +,
                                                          L-PERIPH +,
                              				  LOCAL intersective-mod ] > ]],
                             CONT.RELS <! !> ],
                	      NON-LOCAL.YNQ <! *top* ! > ] ]. 

SEMANTICS: As a result, when we now parse "spit li ivan", we get [INFO-STR info-str] instead of 
[INFO-STR focus] on V "spit".



2a.    FOCUS PROSODY

Because different parts of speech can bear focus in Russian, we had to modify several lexical rules that apply
to the words we use in our lexicons.  That includes nouns, pronouns, adjectives, determiners, and verbs.  

First, we added the -FP suffix to irules.tdl:

	fp-suffix :=
	%suffix (* -FP)
	fp-lex-rule.

Then we added these to the russian.tdl:

	fp-lex-rule-dtr := word-or-lexrule.

	fp-lex-rule := infl-add-only-no-ccont-ltol-rule & [ DTR fp-lex-rule-dtr ] &
	    	     [ SYNSEM.LOCAL.CONT.HOOK.INDEX.INFO-STR focus ].

After we added fp-lex-rule-dtr as the supertype for suffix-common-masc-lex-rule:

     suffix-common-masc-lex-rule := lexeme-to-word-rule & add-only-no-ccont-rule & fp-lex-rule-dtr &
       [ DTR suffix-common-masc-rule-dtr ].

and now we can parse sentences like "Maljchik-FP spit" ("boy sleeps") or #241 "Ivan-FP spit", getting the right semantics, i.e.
"maljchik" and "Ivan" have [ INFO-STR focus ].  

	#241
	Source: a, e
	Vetted: t
	Judgment: g
	Phenomena: information structure
	Ivan-FP spit.
	Ivan sp-it
	Ivan sleep-3SG.PRS
	Ivan-FP is sleeping.


Making no-spr-noun-lex inherit from fp-lex-rule-dtr:      

     no-spr-noun-lex := noun-lex & fp-lex-rule-dtr & 
        [ SYNSEM.LOCAL.CAT.VAL.SPR < [ OPT + ] > ].

allowed us to add focus to the pronouns and parse sentences like #245:

	#245
	Source: a, e
	Vetted: t
	Judgment: g
	Phenomena: information structure
	Ona-FP         spit.
	Ona-FP         sp-it.
	3SG.NOM.FEM-FP sleep-3SG.PRS
	She-FP is sleeping. 

And we added it as a supertype for hard-adjective-1-lex-rule:

     hard-adjective-1-lex-rule := infl-ltow-rule & add-only-no-ccont-rule & fp-lex-rule-dtr.

so now we get the correct semantics for adjectives, like in the sentence:

	#243
	Source: a, e
	Vetted: t
	Judgment: g
	Phenomena: agreement
	Jeta              devochka           chitaet        boljshuju-FP         knigu
	Jet-a             devochk-a          chita-e-t      boljsh-uju-FP        knig-u 
	This-FEM.3SG.NOM  girl-FEM.3SG.NOM   read-3SG-PRS   big-FEM.3SG.ACC-FP   book-FEM.3SG.ACC
	This girl is reading a large-FP book.  

We can also assign focus status to the determiners in sentences like: 

	#242
	Source: a, e
	Vetted: t
	Judgment: g
	Phenomena: information structure
	Jeta-FP    sobaka  spit.
	Jet-a-FP    sobak-a sp-it
	This-FEM-FP dog-NOM sleep-3.SG.PRS
	This-FP dog is sleeping.


 or 

"Tot-FP maljchik spit" after we added:

     jetot-declension-lex-rule := infl-ltow-rule & add-only-no-ccont-rule & fp-lex-rule-dtr &
       [ DTR demonstrative-determiner-lex ].


We now assign right semantics to adverb "bystro" in sentence #191:

	#244
	Source: a, e
	Vetted: t
	Judgment: g
	Phenomena: information structure
	Samoljot  bystro-FP letit.
	Samoljot  bystro-FP let-it
	Plane.NOM quickly-FP fly-3SG.PRS
	The plane is flying-FP quickly.


after we added:

     adverb-lex := basic-adverb-lex & intersective-mod-lex & fp-lex-rule-dtr & 
       [ SYNSEM [ LOCAL [ CAT [ HEAD.MOD < [ LOCAL.CAT.HEAD verb ]>,
	     		        VAL [ SPR < >,
				      SUBJ < >,
				      COMPS < >,
				      SPEC < > ]]]]].


Also to verbs:

     present-1-conj-2-lex-rule := infl-ltow-rule & add-only-no-ccont-rule & fp-lex-rule-dtr &
        [ DTR present-1-conj-2-rule-dtr ].

     past-regular-lex-rule := infl-ltow-rule & add-only-no-ccont-rule & fp-lex-rule-dtr &
        [ DTR past-regular-rule-dtr ].


For example, we can parse and assign correct focus semantics to #240 now:

	#240
	Source: a, e
	Vetted: t
	Judgment: g
	Phenomena: information structure
	Ivan spit-FP.
	Ivan sp-it
	Ivan sleep-3SG.PRS
	Ivan is sleeping-FP.

NOTE: for the future, it would be nice to constrain the focus value to appear only on one word in one
clause (otherwise right now we can assign -FP to as many words as we want) and also allow it to appear twice
when both matrix and embedded clauses are present (such as "SHE said that John bought a BOOK").  (Haven't seen
anything in the sources about several words being able to bear focus, so maybe that's completely irrelevant 
though!)


ITSDB Coverage:

I was unable to create the tsdb instance: even though I followed the instructions from Labs 2 and 3 on creating
files in skeletons (and Index.lisp is pointing at Lab8).  So, below are the previous numbers, but we don't have
the latest number from Lab8 (even though we have all necessary files in skeletons, the home instances are not
being created).  The overgeneration though should be better as will be seen in the next section on
generation after adding the semi.vpm.

	Coverage: 
	Lab 6: 66.9
	Lab 7: 69.4

	Overgeneration:
	Lab 6: 2.6
	Lab 7: 10.3


					VPM (Variable property mapping)

We added to lkb/script:

      (mt:read-vpm (lkb-pathname (parent-directory) "semi.vpm") :semi)

Since we had INFO-STr already there, we didn't have to change it.
We mapped separate PER and NUM features from the external (right-hand side) of the VPM to a single PRENUM 
feature on the internal (left-hand side). 

We added an ASPECT section.

Example of changes in the semi.vpm are below:


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

     PNG.NUM : PNG.NUM
       sg   <> sg
       pl   <> pl
       *    <> !

     E.TENSE : TENSE
       past     <> past
       present  <> present
       future   <> future
       present << *

     E.ASPECT : ASPECT
       perfective <> perfective
       imperfective <> imperfective

     SF : SF
       prop <> prop
       ques <> ques
       prop-or-ques >> prop-or-ques
       prop << prop-or-ques
       comm <> comm

RESULTS: This allowed us to decrease the generation.  For example, for sentence #9:

	#9
	Source: a, e
	Vetted: t
	Judgment: g
	Phenomena: word order
	Ivan spit.
	Ivan sp-it
	Ivan sleep-3SG.PRS
	Ivan is sleeping.

we are now getting 12 outputs instead of 64 that we had before.  		


