syntax based transla0on
play

Syntax-based Transla0on Part 2: Synchronous Grammars Machine - PowerPoint PPT Presentation

Syntax-based Transla0on Part 2: Synchronous Grammars Machine Translation Lecture 14 Instructor: Chris Callison-Burch TAs: Mitchell Stern, Justin Chiu Website: mt-class.org/penn Goals Revisit why people


  1. Syntax-­‑based ¡Transla0on ¡ Part ¡2: ¡Synchronous ¡Grammars Machine Translation Lecture 14 Instructor: Chris Callison-Burch TAs: Mitchell Stern, Justin Chiu Website: mt-class.org/penn

  2. Goals • Revisit ¡why ¡people ¡thought ¡syntax ¡would ¡not ¡help ¡ machine ¡transla0on ¡ • Learn ¡about ¡Synchronous ¡Context ¡Free ¡Grammars ¡ ¡ • Introduce ¡nota0on, ¡and ¡basic ¡algorithm ¡ • Understand ¡how ¡we ¡learn ¡SCFGs ¡from ¡bitexts ¡ • Get ¡a ¡sense ¡of ¡the ¡different ¡flavors ¡of ¡SCFGs ¡ – ¡Hiero ¡ – ¡SAMT 2

  3. The ¡Syntax ¡Bet Every time I fire a linguist my performance goes up • Longstanding ¡debate ¡about ¡whether ¡linguis0c ¡ informa0on ¡can ¡help ¡sta0s0cal ¡transla0on ¡ • Two ¡camps Syntax will improve translation Simpler data-driven models will always win 3

  4. Syntax ¡is ¡bad ¡for ¡transla0on • The ¡IBM ¡Models ¡were ¡the ¡dominant ¡approach ¡to ¡ SMT ¡from ¡the ¡`90s ¡un0l ¡mid ¡2000s ¡ – ¡Eschewed ¡linguis0c ¡informa0on ¡ • A ¡number ¡of ¡studies ¡cast ¡doubt ¡on ¡whether ¡ linguis0c ¡info ¡could ¡help ¡SMT ¡ – Fox ¡(2002) ¡showed ¡that ¡“phrasal ¡cohesion” ¡was ¡less ¡ common ¡than ¡assumed ¡across ¡even ¡related ¡languages ¡ – Koehn ¡et ¡al ¡(2003) ¡empirically ¡demonstrated ¡that ¡ syntac0cally ¡mo0vated ¡phrases ¡made ¡PBMT ¡worse 4

  5. Phrases ¡aren’t ¡coherent ¡in ¡bitexts S Fox (2002) VP VP ADJP PP NP ADJP NP EX MD AUX JJR NN IN JJ NNS There will be more divisiveness than positive effects Elle aura de les effets plus destructifs que positifs Gloss: It will have effects more destructive than positive 5

  6. Ouch! ¡ ¡Syntax ¡hurts! Koehn et al (2003) 28.0 28 27 26 26 25.5 25 BLEU score 25 25 24 24 23 23.0 23 22 22 IBM Model 4 21 20.5 PBMT 20 20 PBMT w/syntactic phrases 18 18.0 18 10k 20k 40k 80k 160k 320k Training corpus size 6

  7. Extrac0ng ¡phrase ¡pairs 澳洲 , Australia 是 , is 之一 , one of 澳 是 与 北 韩 有 邦 的 少 国 之 洲 交 数 家 一 少数 , few 国家 , countries Australia 有 , have is 邦交 , diplomatic relations 与 , with one 北 , North of 韩 , Korea the 澳洲是 , Australia is few 少数 国家 , few countries 有邦交 , have diplomatic relations countries 与北 , with North that 北 韩 , North Korea have 的少数 国家 , the few countries that diplomatic 与北 韩 , with North Korea relations 之一的少数 国家 , one of the the few with countries that North 与北 韩 有邦交 , have diplomatic Korea relations with North Korea 有邦交 的少数 国家 , the few countries that have diplomatic relations

  8. Why ¡does ¡it ¡hurt ¡to ¡limit ¡to ¡cons0tuents? • Massively ¡reduces ¡the ¡inventory ¡of ¡phrases ¡that ¡ can ¡be ¡used ¡as ¡transla0on ¡units ¡ • Eliminates ¡non-­‑cons0tuent ¡phrases, ¡many ¡of ¡ which ¡are ¡quite ¡useful ¡ – ¡ there ¡are ¡ – ¡note ¡that ¡ – ¡according ¡to 8

  9. So, ¡what ¡should ¡we ¡do? • Drop ¡syntax ¡from ¡sta0s0cal ¡machine ¡transla0on, ¡ since ¡syntax ¡is ¡a ¡bad ¡fit ¡for ¡the ¡data ¡ • Abandon ¡conven0onal ¡English ¡syntax ¡and ¡move ¡ towards ¡more ¡robust ¡grammars ¡that ¡adapt ¡to ¡the ¡ parallel ¡training ¡corpus ¡ • Maintain ¡English ¡syntax ¡but ¡design ¡different ¡ syntac0c ¡models 9

  10. Synchronous ¡Context ¡Free ¡Grammars • A ¡common ¡way ¡of ¡represen0ng ¡syntax ¡in ¡NLP ¡is ¡ through ¡context ¡free ¡grammars ¡ • Synchronous ¡context ¡free ¡grammars ¡generate ¡pairs ¡ of ¡corresponding ¡strings ¡ ¡ • Can ¡be ¡used ¡to ¡describe ¡transla0on ¡and ¡re-­‑ordering ¡ between ¡languages ¡ • SCFGs ¡translate ¡sentences ¡by ¡parsing ¡them 10

  11. Example ¡SCFG ¡for ¡Urdu Urdu English S → NP ① VP ② NP ① VP ② VP → PP ① VP ② VP ② PP ① VP → V ① AUX ② AUX ② V ① PP → NP ① P ② P ② NP ① NP → Hamid Ansari hamd ansary NP → Vice President na}b sdr V → nominated namzd P → for kylye AUX → was taa 11

  12. NP ❶ NP ❷ P ❸ V ❹ AUX ❺ hamd ansary na}b sdr kylye taa namzd P ❸ NP ❶ NP ❷ V ❹ AUX ❺ for Hamid Ansari nominated was Vice President

  13. PP ❻ NP ❶ NP ❷ P ❸ V ❹ AUX ❺ hamd ansary na}b sdr kylye taa namzd PP ❻ P ❸ NP ❶ NP ❷ V ❹ AUX ❺ for Hamid Ansari nominated was Vice President

  14. VP ❼ PP ❻ NP ❶ NP ❷ P ❸ V ❹ AUX ❺ hamd ansary na}b sdr kylye taa namzd VP ❼ PP ❻ NP ❶ P ❸ NP ❷ V ❹ AUX ❺ Hamid Ansari nominated was for Vice President

  15. VP ❽ VP ❼ PP ❻ NP ❶ NP ❷ P ❸ V ❹ AUX ❺ hamd ansary na}b sdr kylye taa namzd VP ❽ VP ❼ PP ❻ NP ❶ P ❸ NP ❷ AUX ❺ V ❹ Hamid Ansari was for Vice President nominated

  16. S ❾ VP ❽ VP ❼ PP ❻ NP ❶ NP ❷ P ❸ V ❹ AUX ❺ hamd ansary na}b sdr kylye taa namzd S ❾ VP ❽ VP ❼ PP ❻ NP ❶ P ❸ NP ❷ AUX ❺ V ❹ Hamid Ansari for Vice President was nominated

  17. Discussion: ¡Do ¡you ¡like ¡SCFG? • In ¡what ¡ways ¡are ¡SCFGs ¡befer ¡for ¡describing ¡ reordering ¡than ¡what ¡we ¡saw ¡before? ¡ • Is ¡this ¡a ¡good ¡model ¡of ¡how ¡languages ¡relate? ¡ • What ¡do ¡you ¡think ¡of ¡the ¡synchronous ¡ requirement? (Discuss ¡with ¡your ¡neighbor) 17

  18. Some0mes ¡languages ¡are ¡mismatched S S VP NP ❶ VP NP ❸ Leila Fry NP ❸ V ❷ V ❷ PP Fry misses manque NP ❶ à Leila

  19. Spanish ¡mo0on ¡verb S ❶ S ❶ VP ❸ NP ❷ VP ❸ NP ❷ Nos We we PP V P V fuimos away Drove went NP P coche en car by 19

  20. Spanish ¡mo0on ¡verb, ¡pro-­‑drop S S VP VP NP He VBG PP V V PP nadando Fue swam swimming He+went NP P NP P Ibiza a Ibiza to Ibiza to 20

  21. We ¡are ¡going ¡to ¡use ¡them ¡anyway • SCFGs ¡are ¡mismatched ¡with ¡some ¡linguis0c ¡ phenomena ¡ • But ¡they ¡have ¡nice ¡formal ¡proper0es ¡and ¡well-­‑ defined ¡algorithms 21

  22. Formal ¡defini0on ¡of ¡SCFGs • Aho ¡and ¡Ullman ¡ worked ¡all ¡of ¡this ¡out ¡ in ¡the ¡`60s ¡and ¡`70s ¡ • Compiler ¡theory 22

  23. Formal ¡defini0on ¡of ¡SCFGs for, Hamid Ansari, nominated, hamd ansary, na}b sdr, Vice President, was namzd, kylye, taa • A ¡synchronous ¡context ¡free ¡grammar ¡is ¡ S, NP, VP, PP, formally ¡defined ¡by ¡a ¡tuple P, V, AUX S G ¡= ¡<N, ¡T S , ¡T T , ¡R, ¡S> ¡ • Where ¡ ¡ ¡ – N ¡is ¡a ¡shared ¡set ¡of ¡non-­‑terminal ¡symbols ¡ – T S ¡is ¡the ¡set ¡of ¡source ¡language ¡terminals ¡ – T T ¡is ¡the ¡set ¡of ¡target ¡language ¡terminals ¡ – R ¡is ¡a ¡set ¡of ¡produc0on ¡rules ¡ – S ¡ ∈ ¡N, ¡designated ¡as ¡the ¡goal ¡state 23

  24. Formal ¡defini0on ¡of ¡SCFGs • Each ¡produc0on ¡rule ¡has ¡the ¡form X ¡ → ¡ ⟨ α, ¡β, ¡ ∼ ,w ⟩ ¡ • Where ¡ – ¡X ¡ ∈ ¡N ¡ – ¡α ¡ ∈ ¡(N ¡ ∪ ¡T S )* ¡ – ¡β ¡ ∈ ¡(N ¡ ∪ ¡T T )* ¡ – ¡~ ¡is ¡a ¡one-­‑to-­‑one ¡correspondence ¡between ¡ the ¡non ¡terminals ¡in ¡α ¡and ¡β ¡ – ¡w ¡is ¡a ¡weight ¡assigned ¡to ¡the ¡rule 24

  25. Algorithms ¡for ¡SCFGs • Transla0on ¡with ¡SCFGs ¡is ¡done ¡via ¡parsing ¡ • How ¡do ¡we ¡write ¡an ¡algorithm ¡for ¡parsing? ¡ • One ¡way ¡to ¡do ¡it ¡is ¡as ¡a ¡deduc0ve ¡proof ¡system 25

  26. The ¡CKY ¡Parsing ¡Algorithm ¡ ¡ Axioms _______ ¡ for ¡all ¡(A ¡ → ¡ α ) ∈ ¡R A ¡ → ¡ α Inference ¡rules A ¡ → ¡w i +1 ¡ [A, ¡ i, ¡i +1] ¡ [B, ¡ i, ¡j ] ¡ ¡[C, ¡ j, ¡k ] ¡ ¡A ¡ → ¡BC ¡ [A, ¡ i, ¡k ] Goal [S, ¡0, ¡ n ] 26

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend