LING 388: Language and Computers Sandiway Fong Lecture 26.

15
LING 388: Language and Computers Sandiway Fong Lecture 26

Transcript of LING 388: Language and Computers Sandiway Fong Lecture 26.

Page 1: LING 388: Language and Computers Sandiway Fong Lecture 26.

LING 388: Language and Computers

Sandiway FongLecture 26

Page 2: LING 388: Language and Computers Sandiway Fong Lecture 26.

Last Time

• 3 files:– j25.pl Japanese grammar– g25.pl English grammar– translator25.pl bilingual dictionary

• common interface:– predarg(Predicate,Subject,Object,decl/wh/yesno)

Page 3: LING 388: Language and Computers Sandiway Fong Lecture 26.

j25.pl

use japanese:s(PA,JapaneseSentence,[])

Page 4: LING 388: Language and Computers Sandiway Fong Lecture 26.

j25.pl

Page 5: LING 388: Language and Computers Sandiway Fong Lecture 26.

g25.pl

use english:s(PA,EnglishSentence,[])

Page 6: LING 388: Language and Computers Sandiway Fong Lecture 26.

g25.pl

Page 7: LING 388: Language and Computers Sandiway Fong Lecture 26.

g25.pl

Page 8: LING 388: Language and Computers Sandiway Fong Lecture 26.

g25.pl

NB. previously, a (regular) plural suffixation rule was used

Page 9: LING 388: Language and Computers Sandiway Fong Lecture 26.

g25.pl

Page 10: LING 388: Language and Computers Sandiway Fong Lecture 26.

g25.pl

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

translator25.pl

• Bilingual dictionary + translate/2

Page 12: LING 388: Language and Computers Sandiway Fong Lecture 26.

Tasks today

1. Comment out dual entries for Japanese lexicon – prevent duplicate generation of kana/kanji and romaji

2. Fix infinite loop for generation with the English grammar

3. Update the English grammar to generate wh-questions and yes/no-questions using predarg structure

Page 13: LING 388: Language and Computers Sandiway Fong Lecture 26.

Wh-questionsStanford Parser output:

predarg(buy+past,john,what,wh)

Page 14: LING 388: Language and Computers Sandiway Fong Lecture 26.

Wh-questionsStanford Parser output:

predarg(buy+past,who,book,wh)

Page 15: LING 388: Language and Computers Sandiway Fong Lecture 26.

Yes/No-Questions

• Stanford parser output:

predarg(buy+past,john,book,yesno)