1 / 31

LING 388: Language and Computers

LING 388: Language and Computers. Sandiway Fong Lecture 30. Last Time. Translator doesn’t necessarily produce the same number of translations for both languages Example : object wh -question. 1 English  6 Japanese. 1 Japanese  2 English. Last Time.

doane
Download Presentation

LING 388: Language and Computers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LING 388: Language and Computers Sandiway Fong Lecture30

  2. Last Time • Translator doesn’t necessarily produce the same number of translations for both languages • Example: object wh-question 1 English  6 Japanese 1 Japanese 2 English

  3. Last Time • Translator doesn’t necessarily produce the same number of translations for both languages • Example: subject wh-question 1 English  6 Japanese 1 Japanese  3 English

  4. Last Time • Translator doesn’t necessarily produce the same number of translations for both languages • Example: declarative sentence 1 English  6 Japanese accidentally symmetric 1 Japanese  6 English

  5. Last Time • e2j(E,J) always runs the English grammar first • inefficient when it comes to translating Japanese enumerates all possible English sentences… Count: 32732

  6. Last Time • Order of actions is fixed in e2j(E,J) • define j2e(J,E), which calls the Japanese grammar first • computationally more efficient when translating Japanese Logically equivalent but..

  7. Last Time • These two queries produce the same results • but the order of the answers is different • (unrestricted enumeration vs. providing an instantiated predarg structure to the English grammar)

  8. Last Time • free enumeration: (count: 548)

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

  10. English Idioms

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

  12. 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 Semantic representation predarg(V,Subject,Object,Type) predarg(die+past,john,none,decl)

  13. English Idioms • Add the VP rule to g29.pl: • what values should V, Objectand Endinghave to obtain the correct predicate argument structure? • John kicked the bucket (fixed.. frozen VP expression)

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

  15. 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!

  16. English Idiom Translation • Let’s modify the Japanese grammar (jg29.pl) to handle the following Japanese sentences: • Taroo-gabaketsu-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-gashinda • predarg(shinu+past,taroo,none,decl) • shinda = shinu+past(die) • nakunatta = nakunaru+past • nakunarimashita

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

  18. Japanese Idioms

  19. Japanese Idioms • Examples • taroo-ga sensei-nigoma-osutta • taroo-nom teacher-dat sesame-acc grinded • “John flattered the teacher” • taroo-gaHanako-nigoma-osutta • taroo-nom Hanako-dat sesame-acc grinded • “John flattered Mary” • ni = (dat) dative Case marker • odateta is the Japanese counterpart for flattered Let’s implement the idiomatic meaning flattered = brown-nosed Step 1: add sensei, hanako Step 2: add VP rule for the idiom odateru suru

  20. What do other systems do? • ExploreGoogle Translate

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

  22. Google Translate

  23. Japanese Idioms • Examples: • ジョン がバケツを蹴った • John-gabaketsu-o kicked • John-NOM bucket-ACC kick+PAST • Literal “John kicked the bucket”

  24. Examples: 医者がさじを投げる isha-gasaji-o nageru doctor-NOM spoon-ACC throw+PRES Idiom “gave up” / “threw a spoon” Japanese Idioms

  25. 101 Japanese Idioms • Listen & Learn: 101 Japanese IdiomsMichael Maynard • Sample pages from book is available online http://www.amazon.com/Listen-Learn-101-Japanese-Idioms/dp/084428341X

  26. Sesame grinder: gomasuri (ごますり) • gomasuri (ごますり)

  27. Sesame grinder: gomasuri (ごますり) • gomasuri (ごますり)

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

  29. Sesame grinder: gomasuri (ごますり) • http://jisho.org/

  30. Sesame grinder: gomasuri (ごますり) • gomasuri (ごますり) => sycophant Snapshot is from 2008

  31. Sesame grinder: gomasuri (ごますり) Snapshot is from 2010 Snapshot is from 2012

More Related