250 likes | 346 Views
LING 388: Language and Computers. Sandiway Fong Lecture 22 11/ 8. Administrivia. Graded Homeworks 5 and 6 n o real problems with Homework 5, but Homework 6 seems to be worth reviewing in class. Homework 6 Review. s. O ther verbal morphology constraints progressive be takes - ing
E N D
LING 388: Language and Computers Sandiway Fong Lecture 22 11/8
Administrivia • Graded • Homeworks 5 and 6 • no real problems with Homework 5, but Homework 6 seems to be worth reviewing in class
Homework 6 Review s Other verbal morphology constraints • progressive be takes -ing • rule: (progressive) be V-ing • examples • I was eating dinner • *I was ate dinner • progressive + passive • rule: (progressive) bebe-ingV+en • examples • dinner was being eaten (progressive passive) • *dinner was been eating (*passive progressive) • modify the grammar (g18.pl) to handle the examples above • Report the errors: morphology constraint vp np vp aux n aux was v dinner being eaten
Homework 6 Review • Part 1 • progressive be takes -ing • rule: (progressive) be V-ing • examples • I was eating dinner • *I was ate dinner for progressives:–ingform is required, incompatible with –ed vp(vp(Aux,VP),Ending) --> aux(Aux,Ending), vp(VP,Ending2), {checkEnding(Ending2,ing)}. checkEnding(X,Ending) :- X = Ending -> true ; write(‘Error: verb inflectional ending must be ‘), write(Ending), write(‘, not ‘),write(X),nl, fail.
Homework 6 Review s • Part 2 • progressive + passive • rule: (progressive) bebe-ingV+en • examples • dinner was being eaten (progressive passive) • *dinner was been eating (*passive progressive) vp np vp aux n v aux was dinner being eaten Add lexical insertion rule aux(aux(be-ing),ing) --> [being]. Then solution on previous slide for Part 1 works here too progressive be rule subcategorizes for any VP headed by a –ing verb rule for passive be explicitly subcategorizes for a transitive main verb
Last Time • Japanese language properties • 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)
Grammar j21.pl we can both parse and generate with this simple grammar
Testing the Japanese grammar… Sentences: Taroo-gahon-okatta John-nom book-acc buy-PAST dare-gahon-okatta ka who-nom book-acc buy-PAST Q *dare-gahon-okatta who-nom book-acc buy-PAST Taroo-ga nani-o katta ka John-nom what-acc buy-PAST Q *Taroo-ga nani-o katta John-nom what-acc buy-PAST dare-ga nani-o katta ka who-nom what-acc buy-PAST Q *dare-ga nani-o katta who-nom what-acc buy-PAST Japanese Grammar
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 - same word order as declarative counterpart • object wh-question • complex operation (irregular) • object wh-phrase must be fronted • do-support (insertion of past tense form of “do”) • boughtbuy (untensed form) what did John buy what did John bought what John bought John bought what John bought a book
English Grammar • starting point • grammar g18.pl (see slides in Homework 6 Review section) • parse tree, pre-predicate argument grammar
Let’s modify the example grammar to handle the following sentences 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) add rules for the new words bought book john who what Note: the Japanese grammar incorporates the wh/notwh feature np(np(taroo),notwh) --> [taroo]. np(np(hon),notwh) --> [hon]. np(np(dare),wh) --> [dare]. np(np(nani),wh) --> [nani]. Exercise 2: Step 1
Exercise 2: Step 1 • wh-feature has been added to nouns • got to pass wh feature information up to the noun phrase node level • Basic idea: • 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). • Check your grammar • declarative sentences should work as before • ?-s(X,[john,bought,a,book],[]). • X = s(np(john),vp(v(bought),np(det(a),n(book))))
Exercise 2: Step 1 • check the grammar • subject wh-question • ?- s(X,[who,bought,a,book],[]). • X = s(np(who),vp(v(bought),np(det(a),n(book)))) • note • this is an overly simple in-situ analysis • (normally, it is assumed that who is raised to a higher specifier position, e.g. Specifier of CP) • object wh-question • ?- s(X,[john,bought,what],[]). • X = s(np(john),vp(v(bought),np(what))) • assuming it’s not an echo question • how do we block this analysis? • by stipulating the value of Q to be notwh • vp(vp(Y,Z)) --> transitive(Y,_), np(Z,notwh).
Exercise 2: Step 2 • grammar • 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]. sbar np aux s what vp np did v np john buy wh-trace
Exercise 2: Step 2 • grammar • 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) • object wh-phrase must be fronted • do-support (insertion of past tense form of “do”) • boughtbuy (untensed form) • fronting • sbar(sbar(X,Y)) --> np(X,wh), s(Y). sbar np aux s what vp np did v np john buy wh-trace
Exercise 2: Step 2 • grammar • 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) • object wh-phrase must be fronted • do-support (insertion of past tense form of “do”) • boughtbuy (untensed form) • do-support • sbar(sbar(X,A,Y)) --> np(X,wh), do(A), s(Y). sbar np s aux what np vp did v john buy
Exercise 2: Step 3 • grammar • 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) • object wh-phrase must be fronted • do-support (insertion of past tense form of “do”) • boughtbuy (untensed form) • untensed main verb • transitive(v(bought),ed) --> [bought]. • transitive(v(buy),root) --> [buy]. sbar np s aux what np vp did v john buy
Exercise 2: Step 3 • grammar • 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) • object wh-phrase must be fronted • do-support (insertion of past tense form of “do”) • boughtbuy (untensed form) • VP rule for missing (fronted) object • transitive(v(buy),root) --> [buy]. • vp(vp(Y,np(wh-trace))) --> transitive(Y,root). sbar np aux s what vp np did v np john buy wh-trace
Exercise 2: Step 3 • Grammar check • Test the modified grammar on • What did John buy? • Does the grammar accept • John bought what?
Exercise 2: Step 4 • How do we force our VP fronted rule to be used? • One method: • signal or pass information down the tree encoded in 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,np(wh-trace))) --> transitive(Y,root). sbar np s[objectwh] aux what np did vp [objectwh] v np john buy wh-trace Like a slash category S/NP
Exercise 2: Step 4 • Check all the original sentences work • 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 • 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, add new rule • sbar(S) --> s(S). sbar np s[objectwh] aux what np did vp [objectwh] v john buy
Exercise 3 • Subject and object wh-nouns do not end up in the same place in this simple grammar. • Modify the grammar to use traces of movement. • Generate the following structures: • [Sbar Who [S [NP trace] [VP bought [NP a book]]]] • [Sbar What did [S [NP John] [VP buy [NP trace]]]]