Ling 567 Lab 8 Writeup
Nigel Kilmer and Woodley Packard


============================================================
1. Corpus Sentences
============================================================

We have managed to get several more of the sentences from our test corpus parsing in this lab, and also improved the analysis of the corpus sentence that we got to parse in lab 7.

----------

First, the sentence from last week:

ik wel de skepper spreek swaaret hi
ik wel de skepper spreek swaar-t hi
I will the creator speak swear-PST.PTCP he
he swore I will speak to the creator

Initially we had translated 'de' as the preposition 'to', but in examining other sentences from our corpus it became clear that 'de' is actually a definite determiner, seemingly synonymous with 'di', the definite determiner we already knew about. This meant that we could analyze the verb 'spreek' as a transitive verb that takes an NP complement, rather than one that takes a PP complement as we had thought previously.

----------

The next sentence we got to parse was this one:

de skeplid rööp de koptein
de skeplid rööp-t de koptein
the sailor call-PST.PTCP the captain
the sailor called the captain

This sentence was fairly trivial, as it only required the addition of lexical entries for 'skeplid', 'rööp', and 'koptein'.

----------

A more interesting sentence that we worked on was this:

de koptein kam en lukket uk aur buurd en fraaget de man
de koptein kum-t en luki-t uk aur buurd en fraag-t de man
the captain come-PST.PTCP and look-PST.PTCP out over board and ask-PST.PTCP the man
the captain came and looked out overboard and asked the man

The coordination of verb phrases in this sentence was not an issue - we had that working from before. Other interesting features, though, were the ditransitive verb 'fraag' with a clausal third argument, the construction 'uk aur'... and also the fact that in the corpus the captain asks several things of the man, across the new few sentences in the corpus, so the clausal complement isn't actually present in this sentence. (Frisian does not normally allow optional complements.) In order to make this a bit easier on ourselves, the sentence that we got parsing has some modifications to what was actually in our corpus:

de koptein kam en lukket uk aur buurd en fraaget de man sliipst dü
de koptein kum-t en luki-t uk.aur buurd en fraag-t de man sliip-st dü
the captain come-PST.PTCP and look-PST.PTCP out.over board and ask-PST.PTCP the man sleep-2SG you.SG
the captain came and looked out overboard and asked the man do you sleep

The modifications are the combination of 'uk' and 'aur' into a single lexeme (motivated by other Frisian words such as 'aural', glossed as 'over all' or 'everywhere') and the addition of a simple dummy clausal complement to 'fraag'. The actual questions that the captain asks the man are wh-questions, so we didn't want to use those.

In order to get 'fraag' to work, we added to following tdl to support ditransitive clausal complement verbs, and of course the lexical entry for 'fraag':

emb-clause-ditrans-verb-lex := main-verb-lex & clausal-third-arg-ditrans-lex-item &
  [ SYNSEM.LOCAL.CAT.VAL.COMPS < #comp1 & [ LOCAL.CAT.HEAD noun ],
    		      	         #comp2 & [ LOCAL [ CAT.HEAD +vc,
				                    CONT.HOOK.INDEX.SF prop-or-ques ] ] >,
    ARG-ST < [ ], #comp1, #comp2 > ].

dec-emb-clause-ditrans-verb-lex := emb-clause-ditrans-verb-lex &
  [ SYNSEM.LOCAL.CAT.VAL.COMPS < [ ], [ LOCAL.CONT.HOOK.INDEX.SF prop ] > ].

int-emb-clause-ditrans-verb-lex := emb-clause-ditrans-verb-lex &
  [ SYNSEM.LOCAL.CAT.VAL.COMPS < [ ], [ LOCAL.CONT.HOOK.INDEX.SF ques ] > ].

fraag := int-emb-clause-ditrans-verb-lex &
  [ STEM < "fraag" >,
    SYNSEM.LKEYS.KEYREL.PRED "_ask_v_rel" ].

As for 'uk aur', we attempted to get prepositions to take prepositional phrases as complements, but this didn't quite work and caused a whole bunch of unneeded ambiguity, so we abandoned that for now and went with the simpler analysis of 'uk.aur' as a single lexeme:

uk-aur := prep-lex &
  [ STEM < "uk.aur" >,
    SYNSEM.LKEYS.KEYREL.PRED "_out_over_p_rel" ].

After the necessary additions, the (modified) sentence parsed with nine-way ambiguity, but it seems to be valid ambiguity related to the coordination in the sentence.

----------

Another sentence we got to parse is this one:

diar wiar jens en skep dit silt fan Söld naa Engelönd
diar wiis-t jens en skep dit sil-t fan Söld naa Engelönd
there is-PRET once a ship that sail-PST.PTCP from Söld to England
there once was a ship that sailed from Söld to England

First, we had to add an analysis for the semantically-empty adverb 'diar' (and we did 'ja' too while we were at it since that shows up a lot in our test corpus). A type for semantically-empty adverbs was created, which each of these lexemes inherit from:

empty-adverb-lex := no-rels-hcons-icons-lex-item &
	[ SYNSEM [ LOCAL [ CAT [
		HEAD adv & [ MOD < [ LOCAL intersective-mod & [ CAT [ HEAD verb ] ] ] > ],
		VAL [ SPR < >, SUBJ < >, COMPS < >, SPEC < > ] ] ] ] ].

ja_disc := empty-adverb-lex &
  [ STEM < "ja" > ].

diar_disc := empty-adverb-lex &
  [ STEM < "diar" > ].

A distinction was necessary between ordinary modifiers and adverbs that fill the forfelt, so the following rules were created:

ordinary-head-mod-phrase := head-mod-phrase & [ SYNSEM.LOCAL.CAT.MC #mc, HEAD-DTR.SYNSEM.LOCAL.CAT.MC #mc ].
ordinary-adj-head-int-phrase := adj-head-int-phrase & ordinary-head-mod-phrase.
ordinary-head-adj-int-phrase := head-adj-int-phrase & ordinary-head-mod-phrase.
ordinary-adj-head-scop-phrase := adj-head-scop-phrase & ordinary-head-mod-phrase.
ordinary-head-adj-scop-phrase := head-adj-scop-phrase & ordinary-head-mod-phrase.

forfelt-head-mod-phrase := head-mod-phrase & [ SYNSEM.LOCAL.CAT [ MC +, HEAD verb & [ FORM finite ] ], HEAD-DTR.SYNSEM.LOCAL.CAT.MC na ].
forfelt-adj-head-int-phrase := adj-head-int-phrase & forfelt-head-mod-phrase.
forfelt-adj-head-scop-phrase := adj-head-scop-phrase & forfelt-head-mod-phrase.

Initially there was quite a bit of spurious ambiguity due to PP attachment (~700 parses). To reduce this ambiguity, prepositions were changed to have [ POSTHEAD + ]:

prep-lex := basic-int-mod-adposition-lex & attrib-or-pred-lex-item &
	[ SYNSEM.LOCAL.CAT [
	    HEAD.MOD < [ LOCAL.CAT.HEAD +nv ] >,
	    VAL [
		COMPS < [ OPT -, LOCAL.CAT [	HEAD noun & [ CASE obj ],
				VAL [ SPR < >, SUBJ < >, COMPS < >, SPEC < > ] ] ] >,
		SPR < >, SUBJ < >, SPEC < > ],
            POSTHEAD + ] ].

The NP copula version of 'wiis' was changed to be strictly transitive to avoid ambiguity with the new intransitive 'wiis' meaning 'exists'.

Another change to accomodate this sentence was the addition of a proper noun type:

proper-noun-lex := nodet-singular-noun-noun-lex &
  [ SYNSEM.LKEYS.KEYREL named-relation ].

söld := proper-noun-lex &
  [ STEM < "Söld" >, SYNSEM.LKEYS.KEYREL.CARG "Sol" ].

engelönd := proper-noun-lex &
  [ STEM < "Engelönd" >, SYNSEM.LKEYS.KEYREL.CARG "England" ].

Relative pronouns were analyzed as adjectives that take VP complements. Unorthodox perhaps, but we didn't need any new rules this way. We needed to make the head-adj-phrase type stipulate that the modifier is COMPS <>. The main interesting thing the relative pronoun "adjective" type does is equate its MOD.FIRST's INDEX with its COMPS.FIRST's XARG.

relative-adj-lex := no-rels-hcons-icons-lex-item &
	[ SYNSEM [ LOCAL [ CAT [
		HEAD adj & [ MOD < [ LOCAL intersective-mod & [ CAT [ HEAD noun, VAL.SPR <> ],
                                          CONT.HOOK [ LTOP #ltop, INDEX #subjind ] ] ]
                                  > ],
		VAL [ SPR < >, SUBJ < >, COMPS < #vp >, SPEC < > ],
		POSTHEAD + ] ] ],
          ARG-ST < #vp & [ OPT -, LOCAL [
                              CAT [ HEAD verb & [ FORM finite, INV - ],
                                    VAL [ SPR < >, SUBJ < [ ] >, COMPS < >, SPEC < > ],
                                    MC na ],
                               CONT.HOOK [ LTOP #ltop, XARG #subjind ] ] ] > ].

There is still some ambiguity with PP attachment, but the parse with correct attachment seems to have the correct semantics.


============================================================
2. The 'semi.vpm' File
============================================================

In our semi.vpm file we made the following additions:

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

PNG.NUM : PNG.NUM
  singular <> sg
  dual >> pl
  plural <> pl
  * <> !

PNG.GEND : PNG.GEND
  masculine <> masculine
  feminine <> feminine
  neuter <> neuter
  * <> !

E.TENSE : TENSE
  nonpast <> pres
  past <> past
  nonpast << *
  nonpast << [e]

Including the semi.vpm file seems to have reduced the amount of generation. For a simple sentence like 'di man sliip-t', the only generated sentences are 'di man sliip-t', 'de man sliip-t', and 'man sliip-t', which are all valid. Before adding semi.vpm, we got the additional generations 'sliip-t di man', 'sliip-t de man', and 'sliip-t man'.


============================================================
3. MT-related Changes
============================================================

In order to get translation working, other than the standard changes to lkb/script and lkb/mrsglobals.lsp, we had to change some def_q_rels and indef_q_rels that were still hanging around into exist_q_rels. 

We tested translation of three similar English sentences in this lab:

"dogs sleep"
"the dog sleeps"
"dogs slept"

They all translated as expected.


============================================================
4. Testsuite Coverage
============================================================

Baseline for the testsuite:
  Coverage: 66.1%
  Overgeneration: 1.8%

New results for the testsuite:
  Coverage: 70.6%
  Overgeneration: 1.8%


Baseline for the corpus testsuite:
  Coverage: 5%

New results for the corpus testsuite:
  Coverage: 15%
