LING 388: Language and Computers Sandiway Fong Lecture 16: 10/20.

Slides:



Advertisements
Similar presentations
Lecture 3a Clause functions Adapted from Mary Laughren.
Advertisements

LING 388: Language and Computers Sandiway Fong Lecture 23.
LING 388: Language and Computers Sandiway Fong Lecture 15: 10/18.
LING 388: Language and Computers Sandiway Fong Lecture 22.
LING 388: Language and Computers Sandiway Fong Lecture 23 11/10.
LING 388: Language and Computers Sandiway Fong Lecture 28 12/1.
Wh-movement movement of question words. Two kinds of Questions n Yes/No questions: –Did you see the octopus?yes/no/*dog –Have you eaten yet?yes/no/*apple.
LING 388: Language and Computers Sandiway Fong Lecture 24: 11/16.
LING 388: Language and Computers Sandiway Fong Lecture 24 11/15.
LING 388: Language and Computers Sandiway Fong Lecture 15.
LING/C SC/PSYC 438/538 Computational Linguistics Sandiway Fong Lecture 10: 9/27.
LING 388: Language and Computers Sandiway Fong Lecture 27: 12/1.
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 Sandiway Fong Lecture 28: 12/6.
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.
 Christel Kemke 2007/08 COMP 4060 Natural Language Processing Feature Structures and Unification.
LING 388: Language and Computers Sandiway Fong Lecture 27: 11/30.
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.
LING 388: Language and Computers Sandiway Fong Lecture 28: 12/5.
LING 388 Language and Computers Lecture 20 11/6/03 Sandiway FONG.
LING 388: Language and Computers Sandiway Fong Lecture 26: 11/28.
LING 388: Language and Computers Sandiway Fong Lecture 17: 10/25.
LING 388: Language and Computers Sandiway Fong Lecture 25: 11/21.
LING 388: Language and Computers Sandiway Fong Lecture 16: 10/19.
LING 388: Language and Computers Sandiway Fong Lecture 17: 10/24.
LING 364: Introduction to Formal Semantics Lecture 5 January 26th.
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 Sandiway Fong Lecture 22 11/8.
CAS LX 522 Syntax I Week 11a. Wh-movement.
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 14 10/11.
LING 388: Language and Computers Sandiway Fong Lecture 17.
LING 388: Language and Computers Sandiway Fong Lecture 27.
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 30 12/8.
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.
Context Free Grammars Reading: Chap 9, Jurafsky & Martin This slide set was adapted from J. Martin, U. Colorado Instructor: Rada Mihalcea.
LING 388: Language and Computers Sandiway Fong Lecture 13.
11 Chapter 14 Part 1 Statistical Parsing Based on slides by Ray Mooney.
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 20: 11/3.
LING 388: Language and Computers Sandiway Fong Lecture 12.
LING 388: Language and Computers Sandiway Fong Lecture 11: 10/4.
Lecture Week 5 Basic Constructions of English Sentence.
LING 388: Language and Computers Sandiway Fong Lecture 21.
LING 388: Language and Computers Sandiway Fong Lecture 25.
SYNTAX.
◦ Process of describing the structure of phrases and sentences Chapter 8 - Phrases and sentences: grammar1.
LING 388: Language and Computers Sandiway Fong Lecture 16.
1 Some English Constructions Transformational Framework October 2, 2012 Lecture 7.
LING 388: Language and Computers Sandiway Fong Lecture 20.
LING 388: Language and Computers Sandiway Fong Lecture 23.
LING/C SC/PSYC 438/538 Lecture 19 Sandiway Fong 1.
Lecture 4b: Verb Processes
LING/C SC/PSYC 438/538 Lecture 21 Sandiway Fong.
Presentation transcript:

LING 388: Language and Computers Sandiway Fong Lecture 16: 10/20

Last Time Japanese grammar –head-final: Subject Object Verb –case particles: -ga (nominative), -o (accusative) –wh-in-situ (not fronted): dare (who), nani (what) –sentence-final Q-particle: ka –Examples: Taroo-ga hon-o katta(declarative) taroo-nom book-acc bought Taroo-ga nani-o katta ka(object wh-question) dare-ga hon-o katta ka(subject wh-question)

Last Time Japanese grammar –s(s(Y,Z)) --> np(Y,Q1), nomcase, vp(Z,Q2), sf(Q1,Q2). –vp(vp(Z,Y),Q) --> np(Z,Q), acccase, transitive(Y). –transitive(v(katta)) --> [katta]. –nomcase --> [ga]. –acccase --> [o]. –np(np(taroo),notwh) --> [taroo]. –np(np(hon),notwh) --> [hon]. –np(np(dare),wh) --> [dare]. –np(np(nani),wh) --> [nani]. –sf(wh,notwh) --> [ka]. –sf(notwh,wh) --> [ka]. –sf(notwh,notwh) --> []. –sf(wh,wh) --> [ka]. can both parse and generate with this simple grammar

Today’s Topics –English Wh-Questions

Wh-Questions: English English –Declarative: John bought a book –Wh-Question: Who bought a book?(subject wh-phrase) *John bought what?(only possible as an echo-question) What did John buy?(object wh-phrase) Grammar Implementation –Subject wh-question: straightforward –Object wh-question: complex operation (irregular) 1.object wh-phrase must be fronted 2.do-support (insertion of past tense form of “do”) 3.bought  buy (untensed form)

Wh-Questions: Japanese English –Declarative: John bought a book –Wh-Question: Who bought a book?(subject wh-phrase) *John bought what?(only possible as an echo-question) What did John buy?(object wh-phrase) Japanese –wh-in-situ: meaning wh-phrase appears in same position as a regular noun phrase easy to implement! –Taroo-ga nani-o katta ka nani: means what ka: sentence-final question particle –dare-ga hon-o katta ka dare: means who

English Grammar Starting point: –assume the grammar from the start of Lecture 13 –minus the troublesome left-recursive VP PP rule 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]. pronoun(me) --> [me]. vp(vp(Y)) --> unergative(Y). vp(vp(Y,Z)) --> transitive(Y,_), np(Z). vp(vp(A,V)) --> aux(A), transitive(V,en). unergative(v(ran)) --> [ran]. transitive(v(hit),_) --> [hit]. transitive(v(eat),root) --> [eat]. transitive(v(eats),s) --> [eats]. transitive(v(ate),ed) --> [ate]. transitive(v(eaten),en) --> [eaten]. aux(aux(was)) --> [was].

Wh-Questions: Step 1 English –Declarative: John bought a book –Wh-Question: Who bought a book?(subject wh-phrase) *John bought what?(only possible as an echo-question) What did John buy?(object wh-phrase) New words: –bought bookjohn –who what Grammar rules: –transitive(v(ate),ed) --> [ate]. common_noun(n(ball),sg) --> [ball]. –transitive(v(bought),ed) --> [bought]. –common_noun(n(book),sg) --> [book]. –np(np(N)) --> proper_noun(N). –proper_noun(john) --> [john]. Need also to encode the wh feature –cf. Japanese grammar –np(np(nani),wh) --> [nani].% what

Wh-Questions: Step 1 English –Declarative: John bought a book –Wh-Question: Who bought a book?(subject wh-phrase) *John bought what?(only possible as an echo-question) What did John buy?(object wh-phrase) New words: –bookjohn –who what Grammar rules: –common_noun(n(book),sg,notwh) --> [book]. –common_noun(n(man),sg,notwh) --> [man]. –common_noun(n(men),pl,notwh) --> [men]. –np(np(N),notwh) --> proper_noun(N).% e.g. john –pronoun(who,wh) --> [who]. –pronoun(what,wh) --> [what]. –pronoun(i,notwh) --> [i]. –pronoun(we,notwh) --> [we]. –pronoun(me,notwh) --> [me]. Note: –what can also be a determiner, e.g. what man –[we’re not going to cover this case]

Wh-Questions: Step 1 English –Declarative: John bought a book –Wh-Question: Who bought a book?(subject wh-phrase) *John bought what?(only possible as an echo-question) What did John buy?(object wh-phrase) New words: (book, who, what) –common_noun(n(book),sg,notwh) --> [book]. –pronoun(who,wh) --> [who]. –pronoun(what,wh) --> [what]. Grammar Rules: –s(s(Y,Z)) --> np(Y,Q), vp(Z). –np(np(Y),Q) --> pronoun(Y,Q). –np(np(N),notwh) --> proper_noun(N). –np(np(D,N),Q) --> det(D,Number), common_noun(N,Number,Q). –vp(vp(Y,Z)) --> transitive(Y,_), np(Z,Q). Note: –got to pass wh feature information up to the noun phrase node level

Wh-Questions: Step 1 English –Declarative: John bought a book –Wh-Question: Who bought a book?(subject wh-phrase) *John bought what?(only possible as an echo-question) What did John buy?(object wh-phrase) Grammar Rules: –s(s(Y,Z)) --> np(Y,Q), vp(Z). –np(np(Y),Q) --> pronoun(Y,Q). –np(np(N),notwh) --> proper_noun(N). –np(np(D,N),Q) --> det(D,Number), common_noun(N,Number,Q). –vp(vp(Y,Z)) --> transitive(Y,_), np(Z,Q). –common_noun(n(book),sg,notwh) --> [book]. –pronoun(who,wh) --> [who]. –pronoun(what,wh) --> [what]. –proper_noun(john) --> [john]. Declarative sentence: –?- s(X,[john,bought,a,book],[]). –X = s(np(john),vp(v(bought),np(det(a),n(book))))

Wh-Questions: Step 1 English –Declarative: John bought a book –Wh-Question: Who bought a book?(subject wh-phrase) *John bought what?(only possible as an echo-question) What did John buy?(object wh-phrase) Grammar Rules: –s(s(Y,Z)) --> np(Y,Q), vp(Z). –np(np(Y),Q) --> pronoun(Y,Q). –np(np(N),notwh) --> proper_noun(N). –np(np(D,N),Q) --> det(D,Number), common_noun(N,Number,Q). –vp(vp(Y,Z)) --> transitive(Y,_), np(Z,Q). –common_noun(n(book),sg,notwh) --> [book]. –pronoun(who,wh) --> [who]. –pronoun(what,wh) --> [what]. –proper_noun(john) --> [john]. Subject wh-question: –?- s(X,[who,bought,a,book],[]). –X = s(np(who),vp(v(bought),np(det(a),n(book)))) Note: –an in-situ analysis

Wh-Questions: Step 1 English –Declarative: John bought a book –Wh-Question: Who bought a book?(subject wh-phrase) *John bought what?(only possible as an echo-question) What did John buy?(object wh-phrase) Grammar Rules: –s(s(Y,Z)) --> np(Y,Q), vp(Z). –np(np(Y),Q) --> pronoun(Y,Q). –np(np(N),notwh) --> proper_noun(N). –np(np(D,N),Q) --> det(D,Number), common_noun(N,Number,Q). –vp(vp(Y,Z)) --> transitive(Y,_), np(Z,Q). –pronoun(who,wh) --> [who]. –pronoun(what,wh) --> [what]. Object wh-question: –?- s(X,[john,bought,what],[]). –X = s(np(john),vp(v(bought),np(what))) How do we block this analysis? –By stipulating the value of Q –vp(vp(Y,Z)) --> transitive(Y,_), np(Z,notwh).

Wh-Questions: Step 2 English –Declarative: John bought a book –Wh-Question: Who bought a book?(subject wh-phrase) *John bought what?(only possible as an echo-question) What did John buy?(object wh-phrase) Grammar Rules: –s(s(Y,Z)) --> np(Y,Q), vp(Z). –vp(vp(Y,Z)) --> transitive(Y,_), np(Z,notwh). –pronoun(who,wh) --> [who]. –pronoun(what,wh) --> [what]. Object wh-question: –?- s(X,[what,did,john,buy],[]). We need to write rules for wh-object fronting –First, some rules for “do” –aux(aux(was)) --> [was]. –do(aux(did)) --> [did]. –do(aux(do)) --> [do]. –do(aux(does)) --> [does]. s npvp v sbar np what buy john aux did

Wh-Questions: Step 2.1 English –Declarative: John bought a book –Wh-Question: Who bought a book?(subject wh-phrase) *John bought what?(only possible as an echo-question) What did John buy?(object wh-phrase) Grammar Rules: –s(s(Y,Z)) --> np(Y,Q), vp(Z). –vp(vp(Y,Z)) --> transitive(Y,_), np(Z,notwh). –pronoun(who,wh) --> [who]. –pronoun(what,wh) --> [what]. Object wh-question: –complex operation (irregular) 1.object wh-phrase must be fronted 2.do-support (insertion of past tense form of “do”) 3.bought  buy (untensed form) 1.Fronting –sbar(sbar(X,Y)) --> np(X,wh), s(Y). s npvp v sbar np what buy john aux did

Wh-Questions: Step 2.2 English –Declarative: John bought a book –Wh-Question: Who bought a book?(subject wh-phrase) *John bought what?(only possible as an echo- question) What did John buy?(object wh-phrase) Grammar Rules: –s(s(Y,Z)) --> np(Y,Q), vp(Z). –vp(vp(Y,Z)) --> transitive(Y,_), np(Z,notwh). –pronoun(who,wh) --> [who]. –pronoun(what,wh) --> [what]. Object wh-question: –complex operation (irregular) 1.object wh-phrase must be fronted 2.do-support (insertion of past tense form of “do”) 3.bought  buy (untensed form) 2.Do-support –sbar(sbar(X,A,Y)) --> np(X,wh), do(A), s(Y). s npvp v sbar np what buy john aux did

Wh-Questions: Step 2.3 English –Declarative: John bought a book –Wh-Question: Who bought a book?(subject wh-phrase) *John bought what?(only possible as an echo- question) What did John buy?(object wh-phrase) Grammar Rules: –sbar(sbar(X,A,Y)) --> np(X,wh), do(A), s(Y). –s(s(Y,Z)) --> np(Y,Q), vp(Z). –vp(vp(Y,Z)) --> transitive(Y,_), np(Z,notwh). –pronoun(who,wh) --> [who]. –pronoun(what,wh) --> [what]. Object wh-question: –complex operation (irregular) 1.object wh-phrase must be fronted 2.do-support (insertion of past tense form of “do”) 3.bought  buy (untensed form) 3.Untensed main verb –transitive(v(bought),ed) --> [bought]. –transitive(v(buy),root) --> [buy]. s npvp v sbar np what buy john aux did

Wh-Questions: Step 2.3 English –Declarative: John bought a book –Wh-Question: Who bought a book?(subject wh-phrase) *John bought what?(only possible as an echo-question) What did John buy?(object wh-phrase) Grammar Rules: –sbar(sbar(X,A,Y)) --> np(X,wh), do(A), s(Y). –s(s(Y,Z)) --> np(Y,Q), vp(Z). –vp(vp(Y,Z)) --> transitive(Y,_), np(Z,notwh). –pronoun(who,wh) --> [who]. –pronoun(what,wh) --> [what]. Object wh-question: –complex operation (irregular) 1.object wh-phrase must be fronted 2.do-support (insertion of past tense form of “do”) 3.bought  buy (untensed form) 3.VP rule for missing (fronted) object –transitive(v(buy),root) --> [buy]. –vp(vp(Y)) --> transitive(Y,root). Problem: –sbar rule allows any s node to be used –e.g. allows What did John buy a book –How do we force our VP fronted rule to be used? s npvp v sbar np what buy john aux did

Wh-Questions: Step 2.3 English –Declarative: John bought a book –Wh-Question: Who bought a book?(subject wh-phrase) *John bought what?(only possible as an echo-question) What did John buy?(object wh-phrase) Grammar Rules: –sbar(sbar(X,A,Y)) --> np(X,wh), do(A), s(Y). –s(s(Y,Z)) --> np(Y,Q), vp(Z). –vp(vp(Y,Z)) --> transitive(Y,_), np(Z,notwh). –vp(vp(Y)) --> transitive(Y,root). –pronoun(who,wh) --> [who]. –pronoun(what,wh) --> [what]. Object wh-question: –complex operation (irregular) 1.object wh-phrase must be fronted 2.do-support (insertion of past tense form of “do”) 3.bought  buy (untensed form) How do we force our VP fronted rule to be used? –Pass information down the tree using the nonterminal name Modify rule –sbar(sbar(X,A,Y)) --> np(X,wh), do(A), s_objectwh(Y). Add new rule –s_objectwh(s(Y,Z)) --> np(Y,Q), vp_objectwh(Z). Modify rule –vp_objectwh(vp(Y)) --> transitive(Y,root). s[objectwh] np vp [objectwh] v sbar np what buy john aux did

Wh-Questions: Step 2.3 English –Declarative: John bought a book –Wh-Question: Who bought a book?(subject wh-phrase) *John bought what?(only possible as an echo-question) What did John buy?(object wh-phrase) Grammar Rules: –s(s(Y,Z)) --> np(Y,Q), vp(Z). –vp(vp(Y,Z)) --> transitive(Y,_), np(Z,notwh). –pronoun(who,wh) --> [who]. –pronoun(what,wh) --> [what]. –sbar(sbar(X,A,Y)) --> np(X,wh), do(A), s_objectwh(Y). –s_objectwh(s(Y,Z)) --> np(Y,Q), vp_objectwh(Z). –vp_objectwh(vp(Y)) --> transitive(Y,root). Query: –?- sbar(X,[what,did,john,buy],[]). –X = sbar(np(what),aux(did),s(np(john),vp(v(buy)))) Cleaning up: –sbar(S) --> s(S). s[objectwh] np vp [objectwh] v sbar np what buy john aux did

Next Time We’ll talk about machine translation