Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "LING 388: Language and Computers Sandiway Fong Lecture 16: 10/20."— Presentation transcript:

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

2 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)

3 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

4 Today’s Topics –English Wh-Questions

5 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)

6 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

7 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].

8 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

9 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]

10 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

11 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))))

12 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

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

14 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

15 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

16 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

17 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

18 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

19 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

20 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

21 Next Time We’ll talk about machine translation


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

Similar presentations


Ads by Google