LING 388: Language and Computers Sandiway Fong Lecture 17: 10/24.

Slides:



Advertisements
Similar presentations
LING 388: Language and Computers Sandiway Fong Lecture 15: 10/18.
Advertisements

LING 388: Language and Computers Sandiway Fong Lecture 22.
LING 388: Language and Computers Sandiway Fong Lecture 24: 11/16.
LING 388: Language and Computers Sandiway Fong Lecture 15.
LING 388: Language and Computers Sandiway Fong Lecture 16: 10/20.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 7: 9/12.
LING/C SC/PSYC 438/538 Computational Linguistics Sandiway Fong Lecture 10: 9/27.
LING 364: Introduction to Formal Semantics Lecture 9 February 9th.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 9: 9/21.
LING 388: Language and Computers Sandiway Fong Lecture 15: 10/17.
LING 388: Language and Computers Sandiway Fong Lecture 21: 11/7.
LING 388 Language and Computers Lecture 14 10/16/03 Sandiway FONG.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 22: 11/15.
LING 388: Language and Computers Sandiway Fong Lecture 20: 11/2.
LING 388: Language and Computers Sandiway Fong Lecture 23: 11/14.
LING 388: Language and Computers Sandiway Fong Lecture 14: 10/13.
LING/C SC/PSYC 438/538 Computational Linguistics Sandiway Fong Lecture 9: 9/25.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 23: 11/20.
LING 388 Language and Computers Lecture 10 10/2/03 Sandiway FONG.
LING 388 Language and Computers Take-Home Final Examination 12/9/03 Sandiway FONG.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Fall 2005-Lecture 2.
LING 388 Language and Computers Lecture 20 11/6/03 Sandiway FONG.
LING 388 Language and Computers Lecture 18 10/30/03 Sandiway FONG.
LING 388: Language and Computers Sandiway Fong Lecture 17: 10/25.
LING 388 Language and Computers Lecture 16 10/23/03 Sandiway FONG.
LING 388: Language and Computers Sandiway Fong Lecture 16: 10/19.
LING 388 Language and Computers Lecture 9 9/30/03 Sandiway FONG.
CS 4705 Lecture 11 Feature Structures and Unification Parsing.
LING 388 Language and Computers Lecture 13 10/14/03 Sandiway FONG.
Stochastic POS tagging Stochastic taggers choose tags that result in the highest probability: P(word | tag) * P(tag | previous n tags) Stochastic taggers.
LING 364: Introduction to Formal Semantics Lecture 5 January 26th.
LING 388 Language and Computers Lecture 17 10/28/03 Sandiway FONG.
LING 388: Language and Computers Sandiway Fong Lecture 13: 10/10.
LING 388: Language and Computers Sandiway Fong Lecture 19: 11/1.
LING 388 Language and Computers Lecture 12 10/9/03 Sandiway FONG.
LING 388 Language and Computers Lecture 15 10/21/03 Sandiway FONG.
LING 388: Language and Computers Sandiway Fong Lecture 22 11/8.
LING 388: Language and Computers Sandiway Fong 10/4 Lecture 12.
11 CS 388: Natural Language Processing: Syntactic Parsing Raymond J. Mooney University of Texas at Austin.
LING/C SC/PSYC 438/538 Lecture 19 Sandiway Fong 1.
LING 388: Language and Computers Sandiway Fong Lecture 11.
LING 388: Language and Computers Sandiway Fong Lecture 14 10/11.
LING 388: Language and Computers Sandiway Fong Lecture 17.
LING 388: Language and Computers Sandiway Fong Lecture 7.
LING/C SC/PSYC 438/538 Lecture 14 Sandiway Fong. Administrivia Midterm – This Wednesday – A bit like doing a homework in real time – Bring your laptop.
LING 388: Language and Computers Sandiway Fong Lecture 15 10/13.
LING 388: Language and Computers Sandiway Fong Lecture 18.
LING 388: Language and Computers Sandiway Fong Lecture 26 11/22.
LING 388: Language and Computers Sandiway Fong Lecture 21 11/3.
LING 388: Language and Computers Sandiway Fong Lecture 10.
LING 388: Language and Computers Sandiway Fong Lecture 19.
Today Phrase structure rules, trees Constituents Recursion Conjunction
LING 388: Language and Computers Sandiway Fong Lecture 13.
LING/C SC/PSYC 438/538 Lecture 26 Sandiway Fong. Administrivia 538 Presentations – Send me your choices if you haven’t already Thanksgiving Holiday –
LING 388: Language and Computers Sandiway Fong Lecture 12.
LING 388: Language and Computers Sandiway Fong Lecture 11: 10/4.
Rules, Movement, Ambiguity
LING 388: Language and Computers Sandiway Fong Lecture 21.
LING 388: Language and Computers Sandiway Fong Lecture 25.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 2.
◦ Process of describing the structure of phrases and sentences Chapter 8 - Phrases and sentences: grammar1.
LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.
LING 388: Language and Computers Sandiway Fong Lecture 16.
1 Some English Constructions Transformational Framework October 2, 2012 Lecture 7.
CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 13 (17/02/06) Prof. Pushpak Bhattacharyya IIT Bombay Top-Down Bottom-Up.
LING 388: Language and Computers Sandiway Fong Lecture 20.
LING/C SC/PSYC 438/538 Lecture 19 Sandiway Fong 1.
LING/C SC/PSYC 438/538 Lecture 21 Sandiway Fong.
LING/C SC/PSYC 438/538 Lecture 24 Sandiway Fong.
LING/C SC/PSYC 438/538 Lecture 26 Sandiway Fong.
Presentation transcript:

LING 388: Language and Computers Sandiway Fong Lecture 17: 10/24

Administrivia homework 5 –due this Thursday

Administrivia Computer Lab Class –on Thursday –meet in SS 224 –there will be no homework –just class exercises (to be assumed in homework 6) –we’ll continue implementing more of the grammar for passivization etc.

Today’s Topic case study –How to implement the passive construction verb inflection constraints between auxiliary and main verbs subcategorization and adjuncts

Example Grammar grammar so far –including extra arguments for parse tree –and simple determiner-noun agreement –s(s(Y,Z)) --> np(Y), vp(Z). –np(np(Y)) --> pronoun(Y). –np(np(D,N)) --> det(D,Number), common_noun(N,Number). –det(det(the),_) --> [the]. –det(det(a),sg) --> [a]. –common_noun(n(ball),sg) --> [ball]. –common_noun(n(man),sg) --> [man]. –common_noun(n(men),pl) --> [men]. –pronoun(i) --> [i]. –pronoun(we) --> [we]. –vp(vp(Y)) --> unergative(Y). –vp(vp(Y,Z)) --> transitive(Y), np(Z). –unergative(v(ran)) --> [ran]. –transitive(v(hit)) --> [hit]. query –?- s(X,Sentence,[]).Sentence = Prolog list of words all rules take one extra argument for the parse tree however det and common_noun take two extra arguments: one for the parse tree and one for Number only one extra argument for the parse tree verb classes

Passivization in English... passivization applies only to transitive verbs –I hit the ball(active) –the ball was hit (passive) –transitive(v(hit)) --> [hit]. i.e. passivization should only apply to verbs encoded in the grammar using the transitive non-terminal not for unaccusative or unergative verbs –I arrived –*I was arrived –unaccusative(v(arrived) ) --> [arrived]. –We ran –*We were ran/run –unergative(v(ran)) --> [ran].

Passivization simple phrase structure –I hit the ball(active) –the ball was hit(passive) (non-movement account) s npvp vnp detn the ball hit i s aux vp v np detn the ball hit was avoiding empty categories for simplicity (can be added): the ball was hit e [the ball] i was hit t i

Passivization phrase structure –the ball was hit(passive) rules (active sentence) –s(s(Y,Z)) --> np(Y), vp(Z). –vp(vp(Y,Z)) --> transitive(Y), np(Z). –transitive(v(hit)) --> [hit]. new rules (passive sentence) –vp(vp(A,V)) --> aux(A), transitive(V). –aux(aux(was)) --> [was]. s aux vp v np detn the ball hit was

Passivization 1.s(s(Y,Z)) --> np(Y), vp(Z). 2.np(np(Y)) --> pronoun(Y). 3.np(np(D,N)) --> det(D,Number), common_noun(N,Number). 4.det(det(the),_) --> [the]. 5.det(det(a),sg) --> [a]. 6.common_noun(n(ball),sg) --> [ball]. 7.common_noun(n(man),sg) --> [man]. 8.common_noun(n(men),pl) --> [men]. 9.pronoun(i) --> [i]. 10.pronoun(we) --> [we]. 11.vp(vp(A,V)) --> aux(A), transitive(V). 12.vp(vp(Y)) --> unergative(Y). 13.vp(vp(Y,Z)) --> transitive(Y), np(Z). 14.unergative(v(ran)) --> [ran]. 15.transitive(v(hit)) --> [hit]. 16.aux(aux(was)) --> [was]. query –?- s(X,[the,ball,was,hit],[]). computation tree –?- s(X,[the,ball,was,hit],[]). ?- np(Y,[the,ball,was,hit],L). ?- vp(Z,L,[]). –?- np(Y,[the,ball,was,hit],L). Y=np(det(the),n(ball)) L=[was,hit] –?- vp(vp(A,V),[was,hit],[]). ?- aux(A,[was,hit],L’). ?- transitive(V,L’,[]). –?- aux(A,[was,hit],L’). A=aux(was) L’=[hit] –?- transitive(V,[hit],[]). V=v(hit) X=s(np(det(the),n(ball)),vp(aux(was),v(hit)))

Passive Morphology verbal inflection –hiteat –hitseats(-s) –hitate(-ed) –hiteaten(-en) verbal inflection and passive morphology rule:(passive) be V-en –was hit(ambiguous between -ed and -en) –*was ate(-ed) –was eaten(-en) how to implement this restriction? –vp(vp(A,V)) --> aux(A), transitive(V). idea –use an extra argument to indicate the verb form for transitive other morphological rules (progressive) be V-ing e.g. was eating (passive+progressive) e.g. was being eaten

Passive Morphology verbal inflection –eat(root) –eats(-s) –ate(-ed) –eaten(-en) use an argument to signal the inflected form add rules for eat –transitive(v(eat),root) --> [eat]. –transitive(v(eats),s) --> [eats]. –transitive(v(ate),ed) --> [ate]. –transitive(v(eaten),en) --> [eaten]. original rule –vp(vp(A,V)) --> aux(A), transitive(V). modified rule –vp(vp(A,V)) --> aux(A), transitive(V,en). Constraint for -en realized by Prolog pattern-matching

Passive Morphology grammar rules (partial) –transitive(v(eat),root) --> [eat]. –transitive(v(eats),s) --> [eats]. –transitive(v(ate),ed) --> [ate]. –transitive(v(eaten),en) --> [eaten]. –vp(vp(A,V)) --> aux(A), transitive(V,en). –aux(aux(was)) --> [was]. query –?- vp(X,[was,eaten],[]). computation tree –?- vp(X,[was,eaten],[]).X=vp(A,V) ?- aux(A,[was,eaten],L). ?- transitive(V,en,L,[]). –?- aux(A,[was,eaten],L). A=aux(was) L=[eaten] –?- transitive(V,en,[eaten],[]). V=v(eaten) example: was eaten

Passive Morphology grammar rules (partial) –transitive(v(eat),root) --> [eat]. –transitive(v(eats),s) --> [eats]. –transitive(v(ate),ed) --> [ate]. –transitive(v(eaten),en) --> [eaten]. –vp(vp(A,V)) --> aux(A), transitive(V,en). –aux(aux(was)) --> [was]. query –?- vp(X,[was,ate],[]). computation tree –?- vp(X,[was,ate],[]).X=vp(A,V) ?- aux(A,[was,ate],L). ?- transitive(V,en,L,[]). –?- aux(A,[was,ate],L). A=aux(was) L=[ate] –?- transitive(V,en,[ate],[]). No example: *was ate attempted match fails

Subject in By-Phrase phrase structure –I hit the ball(active) –the ball was hit(passive) –the ball was hit by me(passive + subject in by-phrase) optional prepositional phrase (PP) is adjoined to the verb phrase (VP) s aux vp v np detn the ball hit was vppp p np byme s aux vp v np detn the ball hit was

Subject in By-Phrase phrase structure –I hit the ball(active) –the ball was hit(passive) –the ball was hit by me(passive + subject in by-phrase) add PP rules –pp(pp(P,NP)) --> preposition(P), np(NP). –preposition(p(by)) --> [by]. add VP adjunction rule –vp(vp(VP,PP)) --> vp(VP), pp(PP). add pronoun rule –np(np(Y)) --> pronoun(Y). –pronoun(i) --> [i]. –pronoun(we) --> [we]. –pronoun(me) --> [me]. there is a Case Constraint –(not implemented here) –by me –*by I –*me hit the ball s aux vp v np detn the ball hit was vppp p np byme

Other Constraints examples –I hit the ball(active) –the ball was hit(passive) –the ball was hit by me(passive + by-phrase) –*the ball were hit by me –*the balls was hit by me –the balls were hit by me Subject-Verb Agreement Rule –subject must agree with the verb for number –np(np(D,N)) --> det(D,Number), common_noun(N,Number). –common_noun(n(ball),sg) --> [ball]. –common_noun(n(balls),pl) --> [balls]. –np(np(D,N),Number) --> det(D,Number), common_noun(N,Number). s aux vp v np detn the ball balls hit was were

Other Constraints examples –the ball was hit by me(passive + by-phrase) –*the ball were hit by me –*the balls was hit by me –the balls were hit by me Subject-Verb Agreement Rule –subject must agree with the verb for number –must propagate number feature up the tree! –np(np(D,N),Number) --> det(D,Number),common_noun(N,Number). –common_noun(n(ball),sg) --> [ball]. –common_noun(n(balls),pl) --> [balls]. –s(s(Y,Z)) --> np(Y,Number), vp(Z). –s(s(Y,Z)) --> np(Y,Number), vp(Z,Number). s aux vp v np detn the ball balls hit was were number

Grammar so far new additions today –verbal inflection and passive morphology (passive) be V-en –PP by-phrase “by me” –Subject-Verb Agreement Rule “the ball/balls was/were” grammar is still not fully specified –see underscores “-” 1.s(s(Y,Z)) --> np(Y,Number), vp(Z,Number). 2.np(np(Y),_) --> pronoun(Y). 3.np(np(D,N),Number) --> det(D,Number), common_noun(N,Number). 4.det(det(the),_) --> [the]. 5.det(det(a),sg) --> [a]. 6.common_noun(n(ball),sg) --> [ball]. 7.common_noun(n(balls),pl) --> [balls]. 8.common_noun(n(man),sg) --> [man]. 9.common_noun(n(men),pl) --> [men]. 10.pronoun(i) --> [i]. 11.pronoun(we) --> [we]. 12.pronoun(me) --> [me]. 13.pp(pp(P,NP)) --> preposition(P), np(NP,_). 14.preposition(p(by)) --> [by]. 15.vp(vp(VP,PP),_) --> vp(VP,_), pp(PP). 16.vp(vp(A,V),Number) --> aux(A,Number), transitive(V,en). 17.vp(vp(Y),_) --> unergative(Y). 18.vp(vp(Y,Z),_) --> transitive(Y,_), np(Z,_). 19.unergative(v(ran)) --> [ran]. 20.transitive(v(hit),_) --> [hit]. 21.transitive(v(eat),root) --> [eat]. 22.transitive(v(eats),s) --> [eats]. 23.transitive(v(ate),ed) --> [ate]. 24.transitive(v(eaten),en) --> [eaten]. 25.aux(aux(was),sg) --> [was]. 26.aux(aux(were),pl) --> [were].

Grammar so far ordering of VP rules is critical what happens when rule 15 is moved around for the following query? ?- s(X,[the,balls,were,hit,by,me],[] ). how to block recursion for *the balls were hit by me by the man? ?- s(X,[the,balls,were,hit,by,me,by, the,man],[]). would ternary branching for VP adjuncts work better computationally? i.e. vp(vp(A,V,PP)) --> aux(A), transitive(V,en), pp(PP). 1.s(s(Y,Z)) --> np(Y,Number), vp(Z,Number). 2.np(np(Y),_) --> pronoun(Y). 3.np(np(D,N),Number) --> det(D,Number), common_noun(N,Number). 4.det(det(the),_) --> [the]. 5.det(det(a),sg) --> [a]. 6.common_noun(n(ball),sg) --> [ball]. 7.common_noun(n(balls),pl) --> [balls]. 8.common_noun(n(man),sg) --> [man]. 9.common_noun(n(men),pl) --> [men]. 10.pronoun(i) --> [i]. 11.pronoun(we) --> [we]. 12.pronoun(me) --> [me]. 13.pp(pp(P,NP)) --> preposition(P), np(NP,_). 14.preposition(p(by)) --> [by]. 15.vp(vp(VP,PP),_) --> vp(VP,_), pp(PP). 16.vp(vp(A,V),Number) --> aux(A,Number), transitive(V,en). 17.vp(vp(Y),_) --> unergative(Y). 18.vp(vp(Y,Z),_) --> transitive(Y,_), np(Z,_). 19.unergative(v(ran)) --> [ran]. 20.transitive(v(hit),_) --> [hit]. 21.transitive(v(eat),root) --> [eat]. 22.transitive(v(eats),s) --> [eats]. 23.transitive(v(ate),ed) --> [ate]. 24.transitive(v(eaten),en) --> [eaten]. 25.aux(aux(was),sg) --> [was]. 26.aux(aux(were),pl) --> [were].