LING 388 Language and Computers Sandiway Fong Lecture

  • Slides: 16
Download presentation
LING 388: Language and Computers Sandiway Fong Lecture 17

LING 388: Language and Computers Sandiway Fong Lecture 17

Morphology: Plural inflection • Note: – { … } allows the insertion of Prolog

Morphology: Plural inflection • Note: – { … } allows the insertion of Prolog code into a grammar rule – atom_concat(A 1, A 2, A 3) can concatenate atoms A 1 and A 2 to form A 3, or split A 3 into left side A 1 and right side A 2 Root must already have an entry in the grammar Saves us writing rules for regular plurals like rat/cat but it over-generates, e. g. man/men

Last Time • Two methods for encoding the lexical feature Number – (1) Renaming

Last Time • Two methods for encoding the lexical feature Number – (1) Renaming the matching nonterminal • dt becomes dt_singular/dt_plural/dt_mass • nn becomes nn_singular/nn_plural/nn_mass – (2) adding an extra argument with a Number variable • There’s a tradeoff: – number of rules vs. – extra complexity in terms of the number of arguments

Last Time Nonterminal renaming: dt dt_singular/plural/mass and nn nn_singular/plural/mass Triple the number of rules!

Last Time Nonterminal renaming: dt dt_singular/plural/mass and nn nn_singular/plural/mass Triple the number of rules!

Determiner Noun Agreement • Used an extra argument for nonterminals dt and nn to

Determiner Noun Agreement • Used an extra argument for nonterminals dt and nn to hold the value of the Number feature np(np(np(DT, NN), SBAR)) --> dt(DT, Number), nn(NN, Number), objrel_sbar(SBAR). np(np(np(DT, NN), SBAR)) --> dt(DT, Number), nn(NN, Number), subjrel_sbar(SBAR). empty_np(np(0)) --> []. complementizer(c(that)) --> [that]. dt(dt(the), _) --> [the]. dt(dt(a), singular) --> [a]. nn(nn(man), singular) --> [man]. nn(nn(men), plural) --> [men]. nn(nn(rat), singular) --> [rat]. nn(nn(cat), singular) --> [cat]. nn(nn(Root-Suffix), plural) --> [Word], {atom_concat(Root, Suffix, Word), nn(_, singular, [Root], [])}. nn(nn(cheese), mass) --> [cheese]. suffix(plural) --> [-s]. vbd(saw)) --> [saw]. vbd(ate)) --> [ate]. vbd(chased)) --> [chased].

Today’s Topic • We’ve implement English determiner-noun agreement – Uses the multiple argument strategy

Today’s Topic • We’ve implement English determiner-noun agreement – Uses the multiple argument strategy • Subject-verb agreement is also necessary in English • Example: – John eats cheese Verb inflectional endings – *John eat cheese Example: Form eats ate (eaten) (eating) Ending base -s -ed -en -ing Comment not 3 rd person singular past participle gerund

Subject Verb Agreement Examples 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.

Subject Verb Agreement Examples 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. John eats cheese *John eat cheese John ate cheese *I eats cheese I ate cheese I eat cheese *We eats cheese We eat cheese We ate cheese *You eats cheese You eat cheese You ate cheese He eats cheese *He eat cheese He ate cheese *They eats cheese They eat cheese They ate cheese • Let’s modify the grammar to constrain this properly: – – -s form of the verb is compatible with 3 rd person singular only for the subject NP base form is not compatible with 3 rd person singular for the subject NP

Bare Mass Nouns • For sentences like: – John eats cheese • we can

Bare Mass Nouns • For sentences like: – John eats cheese • we can add a NP rule to allow mass nouns to not require an accompanying determiner: np(np(N)) --> nn(N, mass).

Subject Verb Agreement • What lexical features do we need to implement agreement? Form

Subject Verb Agreement • What lexical features do we need to implement agreement? Form Ending Comment Subject and VP come together at this rule eats ate (eaten) Ending (eating) Person Number eats *eat Ending base not 3 rd person singular -s 3 rd person singular -ed past -en past participle -ing gerund

Subject Verb Agreement • S NP VP rule: not a non-terminal, but inside curly

Subject Verb Agreement • S NP VP rule: not a non-terminal, but inside curly braces, a call to Prolog predicate check. Subj. Verb/3 • Add database rules for check. Subj. Verb/3 to make sure only compatible endings get through: Form eats ate (eaten) (eating) Ending base -s -ed -en -ing Comment not 3 rd person singular past participle gerund

Subject Verb Agreement • Worry about other S NP VP rules later…

Subject Verb Agreement • Worry about other S NP VP rules later…

Subject Verb Agreement 1. Need to modify NP rules to pass up the Person

Subject Verb Agreement 1. Need to modify NP rules to pass up the Person and Number features 2. Need to modify VP rules to pass up the Ending feature Person Number Ending Person Number eats *eat Ending

Subject Verb Agreement • Update np(Parse) np(Parse, Number, Person)

Subject Verb Agreement • Update np(Parse) np(Parse, Number, Person)

Subject Verb Agreement • Update vp(Parse) vp(Parse, Ending) We could use the endings suggested

Subject Verb Agreement • Update vp(Parse) vp(Parse, Ending) We could use the endings suggested earlier (-s, -ed, -en, -ing) or the POS tags:

Subject Verb Agreement • Implementation 1: use verb endings

Subject Verb Agreement • Implementation 1: use verb endings

Subject Verb Agreement • Implementation 2: use POS tags

Subject Verb Agreement • Implementation 2: use POS tags