############################################################################
# David Bullock (bullockd@u.washington.edu).
# LING-567 "Knowledge Engineering for NLP" (Bender).
# Lab 6, due 2006-May-7.
############################################################################

MATRIX AND EMBEDDED DECLARATIVES.

In Mandarin, embedded declaratives have the same form as matrix declaratives. Verbs like 'zhi1dao4' ('know') take an embedded declarative as a complement. A declarative with the same form can also be used as a stand-alone matrix declarative.

For example, here is an embedded declarative:

ni3 zhi1dao4 ni3 de lao3shi1 kan4 ni3
2SG know 2SG GEN teacher look.at 2SG
'You know that your teacher looks at you.'

And here the same declarative is used as a matrix clause:

ni3 de lao3shi1 kan4 ni3
2SG GEN teacher look.at 2SG
'Your teacher looks at you.'

############################################################################

CHANGES TO THE GRAMMAR: MATRIX AND EMBEDDED DECLARATIVES.

I created two subtypes of "declarative-clause":

1. The "matrix-declarative-clause" type requires its daughter to be an S (fully saturated verb) that is a main clause [ MC + ]. The mother S will also be [ MC + ]. (In "rules.tdl", I declared "matrix-declarative" as an instance of this type.)

2. The "embedded-declarative-clause" type requires its daughter to be an S (fully saturated verb) that is not a main clause [ MC - ]. The mother S will also be [ MC - ]. (In "rules.tdl", I declared "embedded-declarative" as an instance of this type.)

I also added the "clause-embedding-verb-lex" type, which requires its complement to be an S that is marked as a non-matrix clause [ MC - ]. The CONT.MSG feature of this complement must also be a "message" type (not "no-msg").

I changed the lexicon entry for 'zhi1dao4' to "clause-embedding-verb-lex" (from "transitive-verb-lex").

In "roots.tdl", I changed the definition of the start symbol: The start symbol must now be a main clause [ MC + ] and requires CONT.MSG to be a "message" type (not "no-msg").

############################################################################

CHANGES TO THE GRAMMAR: PREVENTING MODIFIERS OF PRONOUNS AND PROPER NOUNS.

I also fixed a problem with the Lab 5 grammar in which adjectives were allowed to modify pronouns.

I made a hierarchy of "noun-classifier" values for the NOUNCLASS feature:

A. One branch of the hierarchy is "common-noun-classifier", which includes all the numeral-classifier types ("clf-ben3", "clf-ge", "clf-wei4", etc.). In the lexicon, all common nouns have a NOUNCLASS of the appropriate "common-noun-classifier" subtype.

B. The other branch of the hierarchy is "no-noun-classifier". The "pronoun-lex" and "proper-noun-lex" types have "no-noun-classifier" for their NOUNCLASS feature.

Then I changed the MOD restriction in the "adjective-lex" type, so adjectives can only modify common nouns (which have a "common-noun-classifier" subtype for their NOUNCLASS feature).

As a result of these changes, the test-suite sentences correctly produce no parses where adjectives attempt to modify pronouns.

(There are two other problems I would like to fix in the Lab 5 grammar: restricting the order of pre-NOM modifiers, and fixing the possessive marker "de" so it must be preceded by an NP and hooks up the "possessor" semantics.)

############################################################################

SEMANTIC REPRESENTATIONS FOR DIFFERENT CLAUSE TYPES.

For Matrix Declarative clauses, the grammar now produces the expected semantic representation:

    lao3shi1 hao3 ('Teacher is good.')

    <h1,e2:SEMSORT:TENSE:ASPECT:MOOD,
    {h3:_teacher_n(x4:SEMSORT:BOOL:THIRD:NUMBER:CLF-WEI4),
    h5:reg_quant(x4, h6, h7),
    h8:_good_v(e2, x4),
    h1:proposition_m(h9)},
    {h6 qeq h3,
    h9 qeq h8}>

For Matrix Interrogative clauses, the grammar currently produces 3 parses and the syntax is not quite right (the top handle relation is proposition_m, not question_m):

    lao3shi1 hao3 ma ('Is teacher good?')

    <h1,e2:SEMSORT:TENSE:ASPECT:MOOD,
    {h3:_teacher_n(x4:SEMSORT:BOOL:THIRD:NUMBER:CLF-WEI4),
    h5:reg_quant(x4, h6, h7),
    h8:_good_v(e9:SEMSORT:TENSE:ASPECT:MOOD, x4),
    h10:question_m(e2, h11),
    h1:proposition_m(h12)},
    {h6 qeq h3,
    h11 qeq h8,
    h12 qeq h10}>

For Embedded Declarative clauses (with matrix declaratives), the grammar now produces the expected semantic representation:

    wo3 zhi1dao4 lao3shi1 hao3 ('I know teacher is good.')

    <h1,e2:SEMSORT:TENSE:ASPECT:MOOD,
    {h3:pronoun_n(x4:SEMSORT:FIRST:SG:NO-NOUN-CLASSIFIER:BOOL),
    h5:pronoun_q(x4, h6, h7),
    h8:_know_v(e2, x4, h9),
    h10:_teacher_n(x11:SEMSORT:BOOL:THIRD:NUMBER:CLF-WEI4),
    h12:reg_quant(x11, h13, h14),
    h15:_good_v(e16:SEMSORT:TENSE:ASPECT:MOOD, x11),
    h9:proposition_m(h17),
    h1:proposition_m(h18)},
    {h6 qeq h3,
    h13 qeq h10,
    h17 qeq h15,
    h18 qeq h8}>

For Embedded Interrogative clauses (with matrix declaratives), the grammar currently produces no parses (the verb-neg-verb question form has not yet been hooked up):

    wo3 zhi1dao4 lao3shi1 hao3bu4hao3 ('I know whether teacher is good.')

The negation-particle question might be ambiguous, or might not be interpretable as an embedded question (I need to check):

    ni3 zhi1dao4 lao3shi1 hao3 ma
    A: ('Do you know teacher is good?')
    B: ('You know whether teacher is good.')?

I'm not sure if there is another way to form an embedded interrogative.

############################################################################

TEST-SUITE RESULTS.

For the "Baseline from Lab 5 Final Grammar", [incr tsdb()] reports:

    Coverage: 52%, Overgeneration: 26%.

For the "Lab 6 Final Grammar", [incr tsdb()] reports:

    Coverage: 52%, Overgeneration: 20%.

The overgeneration improved because adjectives can no longer modify pronouns.

The coverage stayed the same, because embedded declaratives in the test suite were parsing in Lab 5, but with the wrong structure (because of a problem with possessive "de" not requiring a preceding NP). The two clauses were parsed as an asyndeton conjunction of two matrix clauses:

    [S-T [S ni3 zhi1dao4 ni3] [S-B [NP de lao3shi1] kan4 ni3]]

Now in Lab 6, embedded declaratives parse correctly:

    [S [S ni3 zhi1dao4 [S [S ni3 de lao3shi1 kan4 ni3]]]]

The verb 'yao4' has not been changed to a clause-embedding verb, because it should probably be a control verb instead (taking an NP and a VP complement). In the current grammar, it still gets a parse with the wrong structure (asyndeton conjunction) when [NP "de"] appears after the verb. A new type of verb-lex should be added to handle control verb.

############################################################################
