LING 388: Language and Computers Sandiway Fong Lecture 27.

Slides:



Advertisements
Similar presentations
LING 388: Language and Computers Sandiway Fong Lecture 23.
Advertisements

LING/C SC/PSYC 438/538 Lecture 22 Sandiway Fong 1.
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.
LING 388: Language and Computers Sandiway Fong Lecture 26.
LING 388: Language and Computers Sandiway Fong Lecture 2.
LING 388: Language and Computers Sandiway Fong Lecture 24 11/15.
LING 388: Language and Computers Sandiway Fong Lecture 29: 12/6.
October 8, : Grammars and Lexicons Lori Levin (Examples from Kroeger)
LING 388: Language and Computers Sandiway Fong Lecture 24.
LING 581: Advanced Computational Linguistics Lecture Notes April 23rd.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 7: 9/12.
LING 388: Language and Computers Sandiway Fong Lecture 15: 10/17.
LING 388: Language and Computers Sandiway Fong Lecture 28: 12/6.
LING 364: Introduction to Formal Semantics Lecture 4 January 24th.
LING 388: Language and Computers Sandiway Fong Lecture 23: 11/14.
LING 388: Language and Computers Sandiway Fong Lecture 14: 10/13.
CS 4705 Lecture 17 Semantic Analysis: Syntax-Driven Semantics.
LING 388: Language and Computers Sandiway Fong Lecture 27: 11/30.
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.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Fall 2005-Lecture 2.
LING 388 Language and Computers Lecture 18 10/30/03 Sandiway FONG.
LING 388: Language and Computers Sandiway Fong Lecture 17: 10/25.
LING 388: Language and Computers Sandiway Fong Lecture 16: 10/19.
LING 388 Language and Computers Lecture 13 10/14/03 Sandiway FONG.
LING 364: Introduction to Formal Semantics Lecture 5 January 26th.
LING 388 Language and Computers Lecture 12 10/9/03 Sandiway FONG.
LING 388 Language and Computers Lecture 15 10/21/03 Sandiway FONG.
LING 388: Language and Computers Sandiway Fong Lecture 22 11/8.
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.
1 LIN 1310B Introduction to Linguistics Prof: Nikolay Slavkov TA: Qinghua Tang CLASS 14, Feb 27, 2007.
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 22: 11/10.
LING 388: Language and Computers Sandiway Fong Lecture 7.
1 Statistical Parsing Chapter 14 October 2012 Lecture #9.
LING 388: Language and Computers Sandiway Fong Lecture 3.
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.
1 Natural Language Processing Lecture Notes 11 Chapter 15 (part 1)
LING 388: Language and Computers Sandiway Fong Lecture 10.
LING 388: Language and Computers Sandiway Fong Lecture 19.
LING 388: Language and Computers Sandiway Fong Lecture 13.
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.
1 Natural Language Processing Chapter 15 (part 2).
LING 388: Language and Computers Sandiway Fong Lecture 12.
Grammars Grammars can get quite complex, but are essential. Syntax: the form of the text that is valid Semantics: the meaning of the form – Sometimes semantics.
Rules, Movement, Ambiguity
LING 388: Language and Computers Sandiway Fong Lecture 21.
LING 388: Language and Computers Sandiway Fong Lecture 25.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 2.
LING/C SC/PSYC 438/538 Lecture 20 Sandiway Fong 1.
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.
10/31/00 1 Introduction to Cognitive Science Linguistics Component Topic: Formal Grammars: Generating and Parsing Lecturer: Dr Bodomo.
Natural Language Processing
Chapter Eight Syntax.
Natural Language Processing
LING/C SC/PSYC 438/538 Lecture 21 Sandiway Fong.
LING 581: Advanced Computational Linguistics
Chapter Eight Syntax.
Presentation transcript:

LING 388: Language and Computers Sandiway Fong Lecture 27

Administrivia 1.Review of translator so far 2.Idioms 3.TCEs 4.Homework 5.Optional Homework

Bi-directional English grammar declarative sentence

Bi-directional English grammar object wh-question

Bi-directional English grammar subject wh-question

Bi-directional English grammar yes/no-question

Bi-directional Japanese Grammar phrase structure rules computing predarg(P,A1,A2,Type)

Bi-directional Japanese Grammar lexical entries

Translator

Milestone A programming milestone in this course has been reached… You know how to implement grammars for multiple languages We’ve seen techniques for implementing a variety of simple syntactic phenomena: basic declarative sentences, English passives, progressives, wh-questions, Japanese passives and wh-questions. Use of extra arguments: record a parse, agreement, pass information up the rule hierarchy Compute (Stanford Parser style) syntax trees Compute predicate-argument structures for the translator

English Idioms Consider the English sentence: – John kicked the bucket – Two possible interpretations: Idiomatic: “John died” Literal: John kicked the bucket idioms: non-composition meaning i.e. meaning of idiom “die” cannot be inferred from the meaning of the constitutive words kick and bucket idioms: non-composition meaning i.e. meaning of idiom “die” cannot be inferred from the meaning of the constitutive words kick and bucket

English Idioms Let’s implement the idiomatic meaning first: – John kicked the bucket (fixed.. frozen VP expression) – #John kicked the buckets – #John kicked a bucket PA representation predarg(V,Subject,Object,Type) predarg(die+past,john,none,decl) PA representation predarg(V,Subject,Object,Type) predarg(die+past,john,none,decl) vp(predarg(die+past,_,none,decl),vbd,_) --> [kicked,the,bucket].

English Idioms Let’s implement the literal meaning next: – John kicked the bucket – John kicked the buckets – John kicked a bucket Note: two parses! (compare with next slide) We need to add the verb kick and the nouns bucket and buckets to the English grammar We need to add the verb kick and the nouns bucket and buckets to the English grammar

English Idioms Let’s implement the literal meaning next: – John kicked the bucket – John kicked the buckets – John kicked a bucket Note: one parse only!

English Idiom Translation Let’s modify the Japanese grammar (jg26.pl) to handle the following Japanese sentences: – Taroo-ga baketsu-o ketta –predarg(keru+past,taroo,baketsu,decl) baketsu ( バケツ ) ( bucket) ketta = keru-past (kick) kerimashita = keru+past (kick) formal shibaita = shibaku+past (kick) shibakimashita = shibaku+past (kick) formal – Taroo-ga shinda –predarg(shinu+past,taroo,none,decl) shinda = shinu+past (die) nakunatta = nakunaru+past nakunarimashita

English Idiom Translation We will also need to modify the translation table to handle: baketsu ( バケツ ) ( bucket) ketta = keru+past (kick) kerimashita = keru+past (kick) shinda = shinu+past (die)

Homework 6: Japanese Idioms Examples – taroo-ga sensei-ni goma-o sutta – taroo-nom teacher-dat sesame-acc grinded – “John flattered the teacher” – taroo-ga Hanako-ni goma-o sutta – taroo-nom Hanako-dat sesame-acc grinded – “John flattered Mary” – ni = (dat) dative Case marker – odateta is the Japanese counterpart for flattered odateru Part 1: Modify j26.pl to implement the idiomatic meaning predarg(odateru+past,taroo,sensei,decl) Step 1: add sensei, hanako Step 2: add VP rule for the idiom Step 1: add sensei, hanako Step 2: add VP rule for the idiom suru

Homework 6: Japanese Idioms Examples – taroo-ga sensei-ni goma-o sutta – taroo-nom teacher-dat sesame-acc grinded – “John flattered the teacher” – taroo-ga Hanako-ni goma-o sutta – taroo-nom Hanako-dat sesame-acc grinded – “John flattered Mary” – ni = (dat) dative Case marker – odateta is the Japanese counterpart for flattered Part 2: Implement the English translation of the Japanese idiom idiomatic meaning predarg(odateru+past,taroo,sensei,decl) => predarg(flatter+past,john,teacher,decl) John flattered the teacher hanako

Optional Homework Implement translation of the following Japanese passive sentences: Hint:

Optional Homework Implement translation of the following Japanese passive sentences: Problem: using a variable for the 2 nd argument doesn't work for translation (see next slide) Hint: make it 'none' and have translation of 'none' (Japanese) be 'none' English

Optional Homework Overgeneration: variable as 2 nd argument allows anything to substitute

Instructions For both homeworks, submit your code. Submit the example runs. Explain your modifications to the code. Due date: next Monday (evening)

What do other systems do? Explore Google Translate

Japanese Idioms Example: – 太郎が先生にごまをすった – taroo-ga sensei-ni goma-o sutta – Taroo-NOM teacher-DAT sesame-ACC grind+PAST – Taroo flattered the teacher case particles -ga が -o を -ni に Note on input methods (MacOS X)

101 Japanese Idioms Listen & Learn: 101 Japanese Idioms Michael Maynard Listen & Learn: 101 Japanese Idioms Michael Maynard Sample pages from book is available online

Sesame grinder: gomasuri ( ごますり ) gomasuri ( ごますり )

Sesame grinder: gomasuri ( ごますり ) gomasuri ( ごますり )

Sesame grinder: gomasuri ( ごますり ) gomasuri ( ごますり ) you have to figure out how to enter Japanese examples... you can use an online Japanese dictionary e.g.