Presentation is loading. Please wait.

Presentation is loading. Please wait.

LING 388: Language and Computers Sandiway Fong Lecture 17.

Similar presentations


Presentation on theme: "LING 388: Language and Computers Sandiway Fong Lecture 17."— Presentation transcript:

1 LING 388: Language and Computers Sandiway Fong Lecture 17

2 Morphology: Plural inflection Note: –{ … } allows the insertion of Prolog code into a grammar rule – atom_concat(A1,A2,A3) can concatenate atoms A1 and A2 to form A3, or split A3 into left side A1 and right side A2 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 Saves us writing rules for regular plurals like rat/cat but it over-generates, e.g. man/men

3 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

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

5 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(vbd(saw)) --> [saw]. vbd(vbd(ate)) --> [ate]. vbd(vbd(chased)) --> [chased].

6 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 – *John eat cheese Verb inflectional endings Example: FormEndingComment eat basenot 3 rd person singular eats-s3 rd person singular ate-edpast (eaten)-enpast participle (eating)-inggerund Verb inflectional endings Example: FormEndingComment eat basenot 3 rd person singular eats-s3 rd person singular ate-edpast (eaten)-enpast participle (eating)-inggerund

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

8 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).

9 Subject Verb Agreement What lexical features do we need to implement agreement? eats *eat FormEndingComment eat basenot 3 rd person singular eats-s3 rd person singular ate-edpast (eaten)-enpast participle (eating)-inggerund FormEndingComment eat basenot 3 rd person singular eats-s3 rd person singular ate-edpast (eaten)-enpast participle (eating)-inggerund Person Number Person Number Ending Subject and VP come together at this rule Person Number Person Number Ending

10 Subject Verb Agreement S NP VP rule: not a non-terminal, but inside curly braces, a call to Prolog predicate checkSubjVerb/3 Add database rules for checkSubjVerb/3 to make sure only compatible endings get through: FormEndingComment eat basenot 3 rd person singular eats-s3 rd person singular ate-edpast (eaten)-enpast participle (eating)-inggerund FormEndingComment eat basenot 3 rd person singular eats-s3 rd person singular ate-edpast (eaten)-enpast participle (eating)-inggerund

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

12 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 eats *eat Person Number Person Number Ending Person Number Person Number Ending

13 Subject Verb Agreement Update np(Parse)  np(Parse,Number,Person)

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

15 Subject Verb Agreement Implementation 1: use verb endings

16 Subject Verb Agreement Implementation 2: use POS tags


Download ppt "LING 388: Language and Computers Sandiway Fong Lecture 17."

Similar presentations


Ads by Google