ling 388: language and computers sandiway fong lecture 26 11/22

14
LING 388: Language and Computers Sandiway Fong Lecture 26 11/22

Upload: anastasia-lawson

Post on 01-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: LING 388: Language and Computers Sandiway Fong Lecture 26 11/22

LING 388: Language and Computers

Sandiway FongLecture 26

11/22

Page 2: LING 388: Language and Computers Sandiway Fong Lecture 26 11/22

Administrivia

• Homework 7 out today– a simple exercise, due next Monday

• No class this Wednesday– day before Thanksgiving

Page 3: LING 388: Language and Computers Sandiway Fong Lecture 26 11/22

Last Time

• Modified g23.pl to produce predicate-argument structure output

Page 4: LING 388: Language and Computers Sandiway Fong Lecture 26 11/22

English Grammar g25.pl• Declarative sentence (transitive)

– John bought a book– John buy-ed a book– Y=SubjectNP Z=[VP P-VForm ObjectNP ]– TNS(P(S,O))

Page 5: LING 388: Language and Computers Sandiway Fong Lecture 26 11/22

English Grammar g25.pl• Passive sentence

– a book was bought– a book be-ed bought NP-trace– Y=SubjectNPZ=[VP [Aux _-VForm ] [VP P-_ [NP trace]]]– TNS(P(_,O))

Page 6: LING 388: Language and Computers Sandiway Fong Lecture 26 11/22

English Grammar g25.pl• Reminder: headof/2 for VP drills down (past the auxiliary verb) to the main

verb to pick out the predicate P

Page 7: LING 388: Language and Computers Sandiway Fong Lecture 26 11/22

English Grammar g25.pl• Passive sentence with subject in by-phrase

– a book was bought by John– a book be-ed bought NP-trace by John– Y=SubjectNP Z=[VP [VP [Aux _-VForm ] [VP P-_ [NP trace]]] [PP [P ] ObliqueNP ]]]– TNS(P(S,O))

Page 8: LING 388: Language and Computers Sandiway Fong Lecture 26 11/22

English Grammar g25.pl• Subject wh-questions

– Who bought a book?Who wh-trace buy-ed a bookNP _ [VP P-VForm ObjectNP]

TNS(P(S,O))

same predarg/3as before

Page 9: LING 388: Language and Computers Sandiway Fong Lecture 26 11/22

English Grammar g25.pl• Object wh-questions

– What did John buy?What do-ed John buy-root wh-traceNP aux(_-VForm) SubjectNP [VP P-_ ]

TNS(P(S,O))

Page 10: LING 388: Language and Computers Sandiway Fong Lecture 26 11/22

English Grammar g25.pl

• Some limitations remain, g25.pl cannot handle:– By whom was a book bought?– (*)Whom was a book bought by?

– … would involve writing rules for PP-Wh-phrase fronting and verb movement (aux)

Page 11: LING 388: Language and Computers Sandiway Fong Lecture 26 11/22

Grammar j24.pl

• Already outputs predicate-argument structure but needs to be modified to output tense

From g25.pl

Page 12: LING 388: Language and Computers Sandiway Fong Lecture 26 11/22

Grammar j24.pl• Also, predarg/3 and headof/2 clash with the English equivalents

English wordorder assumed

Page 13: LING 388: Language and Computers Sandiway Fong Lecture 26 11/22

Translator

• Need to change maptree/2 into mapPA/2 (PA = predicate-argument)

Page 14: LING 388: Language and Computers Sandiway Fong Lecture 26 11/22

Homework 7[Courtesy of Rosse Ann Gonzales]• Japanese passives

– kau (buy) --> kawareru (passive form of kau, present tense)– katta (kau-ed)– kawareta (passive form of kau-ed)

• Modify j24.pl (j26.pl) to handle the Japanese equivalents of– The book was bought– Input: hon-ga kawareta– Output: past(kau(_,hon))

– The book was bought by John– Input: hon-ga taroo-ni kawareta– Output: past(kau(taroo,hon))

Submit your modified grammar and runs.

• [It is first conjugated to the negative form stem, "kawa" (otherwise the negative present form is "kawanai"), then "reru" is added. However, this is an u-verb, so only u-verbs get conjugated this way. The other verbs which are ru-verbs, would be conjugated differently.]

• [Also, if you wanted to say "the book was bought by john," the preposition phrase would be marked by the particle "ni.”]