1 / 16

LING 388: Language and Computers

LING 388: Language and Computers. Sandiway Fong Lecture 18. Administrivia. Next week, Ben Martin will be teaching in place of me …. Last Time. We implemented subject-verb agreement: John eats /* eat cheese Combine information from the subject NP and the verb NP information

Télécharger la présentation

LING 388: Language and Computers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LING 388: Language and Computers Sandiway Fong Lecture 18

  2. Administrivia • Next week, Ben Martin will be teaching in place of me …

  3. Last Time • We implemented subject-verb agreement: • John eats/*eat cheese Combine information from the subject NP and the verb • NP information • e.g. John Person:3rd, Number: singular • Verb inflectional endings • Form POS tag Comment • eat vb not 3rd person singular, present • eats vbz 3rd person singular, present • ate vbd past • eatenvbn past participle (passive, perfective) • eatingvbg gerund (progressive)

  4. g17.pl • Constraint table: • % table of Person Number Tag possible combinations • check(3,plural,vb). • check(3,plural,vbd). • check(3,singular,vbz). • check(3,singular,vbd). Person, Number from Subject NP POS tag from verb

  5. g17.pl • Sentence rules: s(s(NP,VP)) --> np(NP,Person,Number), vp(VP,Tag), {check(Person,Number,Tag)}. objrel_s(s(NP,VP)) --> np(NP,Person,Number), objrel_vp(VP,Tag), {check(Person,Number,Tag)}. subjrel_s(s(NP,VP)) --> empty_np(NP,Person,Number), vp(VP,Tag), {check(Person,Number,Tag)}. {check(Person,Number,Tag)} Prolog code np(Parse,Person,Number) nonterminal vp(Parse,Tag) nonterminal

  6. g17.pl • VP rules (with updated calls to np): vp(vp(V,NP),Tag) --> verb(V,Tag), np(NP,_,_). objrel_vp(vp(V,NP),Tag) --> verb(V,Tag), empty_np(NP,_,_). vp(Parse,Tag) verb(Parse,Tag) np(Parse,Person,Number) empty_np(Parse,Person,Number)

  7. g17.pl • NP rules: np(np(DT,NN),Person,Number) --> dt(DT,Number), nn(NN,Number,Person). np(np(np(DT,NN),SBAR),Person,Number) --> dt(DT,Number), nn(NN,Number,Person), objrel_sbar(SBAR). np(np(np(DT,NN),SBAR),Person,Number) --> dt(DT,Number), nn(NN,Number,Person), subjrel_sbar(SBAR). np(Parse,Person,Number) nn(Parse,Number,Person)

  8. g17.pl • nn (common noun) rules: nn(nn(man),singular,3) --> [man]. nn(nn(men),plural,3) --> [men]. nn(nn(rat),singular,3) --> [rat]. nn(nn(cat),singular,3) --> [cat]. nn(nn(Root-Suffix),Number,Person) --> [Word], {atom_concat(Root,Suffix,Word), suffix(Number,[Suffix],[]), nn(_,singular,Person,[Root],[])}. nn(nn(cheese),mass,3) --> [cheese]. suffix(plural) --> [s]. nn(Parse,Number,Person)

  9. g17.pl • dt (determiner) rules: dt(dt(the),_) --> [the]. dt(dt(a),singular) --> [a]. dt(Parse,Number)

  10. g17.pl • verb rules: verb(vb(see),vb) --> [see]. verb(vbz(sees),vbz) --> [sees]. verb(vbg(seeing),vbg) --> [seeing]. verb(vbd(saw),vbd) --> [saw]. verb(vbn(seen),vbn) --> [seen]. verb(vb(eat),vb) --> [eat]. verb(vbz(eats),vbz) --> [eats]. verb(vbg(eating),vbg) --> [eating]. verb(vbd(ate),vbd) --> [ate]. verb(vbn(eaten),vbn) --> [eaten]. verb(vb(chase),vb) --> [chase]. verb(vbz(chases),vbz) --> [chases]. verb(vbg(chasing),vbg) --> [chasing]. verb(vbd(chased),vbd) --> [chased]. verb(vbn(chased),vbn) --> [chased]. verb(Parse,Tag)

  11. g17.pl • Other rules (not affected by subject-verb agreement): sbar(sbar(C,S)) --> complementizer(C), s(S). objrel_sbar(sbar(C,S)) --> complementizer(C), objrel_s(S). subjrel_sbar(sbar(C,S)) --> complementizer(C), subjrel_s(S). complementizer(c(that)) --> [that].

  12. g17.pl • Empty NP rule: empty_np(np(0),3,singular) --> []. % for now... • We can't always assume those Person and Number values. Why? • Examples: • the rats/rat that ate the cheese • the rats that eat/*eats the cheese • the rat that *eat/eats the cheese np(Parse,Person,Number) Let's fix g17.pl for the subject relative clause case

  13. English Passivization • 2nd extra argument verb Tagcan also be useful in verb to verb constraints Passive morphology the sandwich was eaten *the sandwich was eat *the sandwich was eats *the sandwich was ate *the sandwich was eating Stanford parser:

  14. English Passivization Passive morphology the sandwich was eaten *the sandwich was eat *the sandwich was eats *the sandwich was ate *the sandwich was eating • Stanford parser: Non-passive reading…

  15. English Passivization Passive morphology the sandwich was eaten *the sandwich was eat *the sandwich was eats *the sandwich was ate *the sandwich was eating • Let’s implement this passive morphology constraint, • i.e. passive auxiliary verb be requires following verb to have the past participle ending (vbn, -en) vp(vp(Vpassive,vp(V))) --> v_passive(Vpassive), v(V,vbn). v_passive(aux(was)) --> [was]. v_passive(aux(were)) --> [were].

  16. English Passivization • How about subject verb agreement for passive be? • the sandwich was/*were eaten • the sandwiches *was/were eaten

More Related