Statistical Machine Translation
Slides from Ray Mooney
Università di Pisa
Human Language Technologies
Dipartimento di Informatica
Università di Pisa
What makes a good translation
Statistical MT: Faithfulness and Fluency formalized!
The IBM model
More formally
F = f1, f2, f3,…, fm
Ē = e1, e2, e3,…, en
Ē = argmaxE P(E|F)
= argmaxE P(F|E)P(E)/P(F)
= argmaxE P(F|E)P(E)
Translation Model
Language Model
The noisy channel model for MT
Fluency: P(T)
That car was almost crash onto me
That car almost hit me
Faithfulness: P(S|T)
that pleases me - most fluent
I like it
I’ll take that one
Faithfulness P(S|T)
Faithfulness P(S|T)
Big Point about Faithfulness and Fluency
P(T) and bag generation: the answer
“Usually the actual capacity of the table is somewhat less, since the hashing is not prefectly collision-free”
Three Problems for Statistical MT
Language model
Translation model
Decoding algorithm
Slide from Kevin Knight
The Classic Language Model: Word N-Grams
Slide from Kevin Knight
Language Model
Slide from Ray Mooney
Phrase Based Machine Translation
Intuition of phrase-based translation (Koehn et al. 2003)
Three steps
Slide from Ray Mooney
Phrase-Based Translation Model
P(F | E) is modeled by translating phrases in E to phrases in F.
Slide from Ray Mooney
Translation Probabilities
Slide from Ray Mooney
Distortion Probability
Slide from Ray Mooney
Set 0<α<1 based on fit to phrase-aligned training data
Then set c to normalize d(i) so it sums to 1.
Sample Translation Model
Position | 1 | 2 | 3 | 4 | 5 | 6 |
English | Mary | did not | slap | the | green | witch |
Spanish | Maria | no | dió una bofetada a | la | bruja | verde |
ai−bi−1 | 1 | 1 | 1 | 1 | 2 | -1 |
Slide from Ray Mooney
verde - la
bruja - verde
Phrase-based MT
Training P(F|E)
But we don’t have phrase alignments
What we have instead are word alignments:
(actually the word alignments we have are more restricted than this, as we’ll see in two slides)
Getting phrase alignments
To get phrase alignments:
How to Represent Word Alignments
One addition: spurious words
More sophisticated models of alignment
One to Many Alignment
NULL Mary didn’t slap the green witch.
Maria no dió una bofetada a la bruja verde.
0 1 2 3 4 5 6
1 2 3 3 3 0 4 6 5
Computing word alignments: IBM Model 1
IBM Model 1
Slide from Ray Mooney
Sample IBM Model 1 Generation
verde.
1 2 3 3 3 0 4 6 5
NULL Mary didn’t slap the green witch.
0 1 2 3 4 5 6
Maria
no
dió
una
bofetada
a
la
bruja
Slide from Ray Mooney
J
alignment
Computing P(F|E) in IBM Model 1
Decoding for IBM Model 1
Goal is to find the most probable alignment given a parameterized model.
Since translation choice for each position j is independent,
the product is maximized by maximizing each term:
Training alignment probabilities
Step 1: get a parallel corpus
Step 2: sentence alignment
Step 3: use EM (Expectation Maximization) to train word alignments
Step 1: Parallel corpora
Example from DE-News (8/1/1996)
English | German |
Diverging opinions about planned tax reform | Unterschiedliche Meinungen zur geplanten Steuerreform |
The discussion around the envisaged major tax reform continues . | Die Diskussion um die vorgesehene grosse Steuerreform dauert an . |
The FDP economics expert , Graf Lambsdorff , today came out in favor of advancing the enactment of significant parts of the overhaul , currently planned for 1999 . | Der FDP - Wirtschaftsexperte Graf Lambsdorff sprach sich heute dafuer aus , wesentliche Teile der fuer 1999 geplanten Reform vorzuziehen . |
Slide from Christof Monz
Step 2: Sentence Alignment
The old man is happy. He has fished many times. His wife talks to him. The fish are jumping. The sharks await.
Intuition:
El viejo está feliz porque ha pescado muchos veces. Su mujer habla con él. Los tiburones esperan.
Slide from Kevin Knight
Sentence Alignment
El viejo está feliz porque ha pescado muchos veces.
Su mujer habla con él.
Los tiburones esperan.
Slide from Kevin Knight
Sentence Alignment
El viejo está feliz porque ha pescado muchos veces.
Su mujer habla con él.
Los tiburones esperan.
Slide from Kevin Knight
Sentence Alignment
El viejo está feliz porque ha pescado muchos veces.
Su mujer habla con él.
Los tiburones esperan.
Note that unaligned sentences are thrown out, and
sentences are merged in n-to-m alignments (n, m > 0).
Slide from Kevin Knight
Step 3: word alignments
We can bootstrap alignments from a sentence-aligned bilingual corpus
using the Expectation-Maximization (EM) algorithm
P(A|E, F) is the probability of the alignment A given a translated pair of sentences E and F
EM for training alignment probs
… la maison … la maison bleue … la fleur …
… the house … the blue house … the flower …
All word alignments equally likely
All P(french-word | english-word) equally likely
Slide from Kevin Knight
EM for training alignment probs
… la maison … la maison bleue … la fleur …
… the house … the blue house … the flower …
“la” and “the” observed to co-occur frequently,
so P(la | the) is increased.
Slide from Kevin Knight
EM for training alignment probs
… la maison … la maison bleue … la fleur …
… the house … the blue house … the flower …
“house” co-occurs with both “la” and “maison”, but
P(maison | house) can be raised without limit,
while P(la | house) is limited because
“la” may align also to “the”
(pigeonhole principle)
Slide from Kevin Knight
EM for training alignment probs
… la maison … la maison bleue … la fleur …
… the house … the blue house … the flower …
settling down after another iteration
Slide from Kevin Knight
EM for training alignment probs
… la maison … la maison bleue … la fleur …
… the house … the blue house … the flower …
Inherent hidden structure revealed by EM training!
Slide from Kevin Knight
EM Algorithm for Word Alignment
Slide from Ray Mooney
Randomly set model parameters.
(making sure they represent legal distributions)
Until converge (i.e. parameters no longer change) do:
E Step: Compute the probability of all possible
alignments of the training data using the current model.
M Step: Use these alignment probability estimates to
re-estimate values for all of the parameters.
Note: Use dynamic programming (as in Baum-Welch)
to avoid explicitly enumerating all possible alignments
IBM Model 1 and EM
Sample EM Trace for Alignment
green house
casa verde
the house
la casa
Training
Corpus
| verde | casa | la |
green | 1/3 | 1/3 | 1/3 |
house | 1/3 | 1/3 | 1/3 |
the | 1/3 | 1/3 | 1/3 |
Translation
Probabilities
Assume uniform
initial probabilities
green house
casa verde
green house
casa verde
the house
la casa
the house
la casa
Compute
Alignment
Probabilities
P(a, f | e)
1/3 x 1/3 = 1/9
1/3 x 1/3 = 1/9
1/3 x 1/3 = 1/9
1/3 x 1/3 = 1/9
Normalize
to get
P(a, f | e)
Slide from Ray Mooney
2/9
2/9
Example cont.
green house
casa verde
green house
casa verde
the house
la casa
the house
la casa
1/2
1/2
1/2
1/2
Compute
weighted
translation
counts
| verde | casa | la |
green | 1/2 | 1/2 | 0 |
house | 1/2 | 1/2 + 1/2 | 1/2 |
the | 0 | 1/2 | 1/2 |
Normalize
rows to sum
to one to
estimate P(f | e)
| verde | casa | la |
green | 1/2 | 1/2 | 0 |
house | 1/4 | 1/2 | 1/4 |
the | 0 | 1/2 | 1/2 |
Slide from Ray Mooney
Example cont.
green house
casa verde
green house
casa verde
the house
la casa
the house
la casa
1/2 x 1/4=1/8
Recompute
Alignment
Probabilities
P(a, f | e)
1/2 x 1/2=1/4
1/2 x 1/2=1/4
1/2 x 1/4=1/8
Normalize
to get
P(a, f | e)
Continue EM iterations until translation
parameters converge
Translation
Probabilities
| verde | casa | la |
green | 1/2 | 1/2 | 0 |
house | 1/4 | 1/2 | 1/4 |
the | 0 | 1/2 | 1/2 |
Slide from Ray Mooney
1/8 + 1/4=3/8
1/4 + 1/8=3/8
IBM Model 1 and EM Algorithm
initialize t(e|f) uniformly
repeat
set count(e|f) to 0 for all e, f
set total(f) to 0 for all f
for all sentence pairs (e_s, f_s)
for all words e in e_s
total_s = 0
for all words f in f_s
total_s += t(e|f)
for all words e in e_s
for all words f in f_s
count(e|f) += t(e|f) / total_s
total(f) += t(e|f) / total_s
for all f where total(f) != 0
for all e in count(e|f)
t(e|f) = count(e|f) / total(f)
until convergence
Higher IBM Models
IBM Model 1 | lexical translation |
IBM Model 2 | adds absolute reordering model |
IBM Model 3 | adds fertility model |
IBM Model 4 | relative reordering model |
Phrase-based Translation Model
Phrase-based Translation Model
Benefits of PBMT
Phrase Translation Table
Phrase translations for den Vorschlag
English | φ(e|f) | English | φ(e|f) |
the proposal | 0.6227 | the suggestions | 0.0114 |
's proposal | 0.1068 | the proposed | 0.0114 |
a proposal | 0.0341 | the motion | 0.0091 |
the idea | 0.025 | the idea of | 0.0091 |
this proposal | 0.0227 | the proposal , | 0.0068 |
proposal | 0.0205 | its proposal | 0.0068 |
of the proposal | 0.0159 | it | 0.0068 |
the proposals | 0.0159 | ... | ... |
Phrase Alignment
Phrase Alignments from Word Alignments
Phrase Alignment Example
| Maria | no | dio | una | bofetada | a | la | bruja | verde |
Mary | | | | | | | | | |
did | | | | | | | | | |
not | | | | | | | | | |
slap | | | | | | | | | |
the | | | | | | | | | |
green | | | | | | | | | |
witch | | | | | | | | | |
Spanish to English
Slide from Ray Mooney
Phrase Alignment Example
| Maria | no | dio | una | bofetada | a | la | bruja | verde |
Mary | | | | | | | | | |
did | | | | | | | | | |
not | | | | | | | | | |
slap | | | | | | | | | |
the | | | | | | | | | |
green | | | | | | | | | |
witch | | | | | | | | | |
English to Spanish
Slide from Ray Mooney
Phrase Alignment Example
| Maria | no | dio | una | bofetada | a | la | bruja | verde |
Mary | | | | | | | | | |
did | | | | | | | | | |
not | | | | | | | | | |
slap | | | | | | | | | |
the | | | | | | | | | |
green | | | | | | | | | |
witch | | | | | | | | | |
Intersection
Slide from Ray Mooney
Symmetrizing
| Maria | no | dio | una | bofetada | a | la | bruja | verde |
Mary | | | | | | | | | |
did | | | | | | | | | |
not | | | | | | | | | |
slap | | | | | | | | | |
the | | | | | | | | | |
green | | | | | | | | | |
witch | | | | | | | | | |
Add alignments from union to intersection
to produce a consistent phrase alignment
Slide from Ray Mooney
Consistent with word alignment
Word Alignment Induced Phrases
(Maria no, Mary did not), (no dio una bofetada, did not slap), (dio una bofetada a la, slap the), (bruja verde, green witch)
(Maria no dio una bofetada, Mary did not), (no dio una bofetada a la, did not slap the), (a la bruja verde, the green witch)
| Maria | no | dio | una | bofetada | a | la | bruja | verde |
Mary | | | | | | | | | |
did | | | | | | | | | |
not | | | | | | | | | |
slap | | | | | | | | | |
the | | | | | | | | | |
green | | | | | | | | | |
witch | | | | | | | | | |
Phrase Translation Table
Sample phrase table from Moses (en-it)
f e φ(f|e) lex(f|e) φ(e|f) lex(e|f) Alignments (F-E)
! it definitively correct that ||| , che conferma ||| 0.0136986 5.6952e-07 1 4.68166e-17 ||| 0-0 4-1 1-2 ||| 73 1
! it depends ||| sono solo ||| 0.00107991 2.85796e-05 1 5.63319e-11 ||| 1-0 2-1 ||| 926 1
! it does not bode at all ||| , che non lascia presagire nulla di ||| 1 2.58282e-09 0.5 1.60281e-13 ||| 0-0 1-1 2-2 3-2 4-3 4-4 4-5 5-5 6-5 ||| 1 2
! it does not bode at all ||| , che non lascia presagire nulla ||| 1 2.20735e-08 0.5 1.60281e-13 ||| 0-0 1-1 2-2 3-2 4-3 4-4 4-5 5-5 6-5 ||| 1 2
! it does not ||| , che non ||| 0.000334448 0.000259527 1 1.16381e-08 ||| 0-0 1-1 2-2 3-2 ||| 2990 1
! it has become a ||| , che è diventata una ||| 0.2 6.20953e-07 1 3.72893e-08 ||| 0-0 1-1 1-2 2-2 3-3 4-4 ||| 5 1
! it has become ||| , che è diventata ||| 0.0588235 2.67744e-06 1 7.12714e-08 ||| 0-0 1-1 1-2 2-2 3-3 ||| 17 1
! it has not been implemented yet ||| e non è ancora stato applicato ||| 1 3.69476e-07 1 1.233e-10 ||| 0-0 3-1 1-2 2-2 6-3 4-4 5-5 ||| 1 1
! it has not ||| e non è ||| 0.000823045 0.000251293 1 4.8038e-08 ||| 0-0 3-1 1-2 2-2 ||| 1215 1
! it has ||| ! ||| 5.86751e-05 0.755472 0.5 1.82129e-05 ||| 0-0 ||| 17043 2
! it has ||| , che è ||| 0.000127307 7.00774e-05 0.5 1.41342e-07 ||| 0-0 1-1 1-2 2-2 ||| 7855 2
' access to cheap medicines ||| di accedere a farmaci a basso prezzo ||| 1 2.18888e-07 1 5.95807e-07 ||| 0-0 2-0 1-1 2-2 4-3 3-4 3-5 3-6 ||| 1 1
' access to credit ||| l' accesso al credito da parte ||| 1 5.13669e-09 0.333333 2.9826e-05 ||| 0-0 1-0 1-1 2-2 3-3 ||| 1 3
' access to credit ||| l' accesso al credito da ||| 1 2.01676e-06 0.333333 2.9826e-05 ||| 0-0 1-0 1-1 2-2 3-3 ||| 1 3
' access to credit ||| l' accesso al credito ||| 0.030303 0.000396314 0.333333 2.9826e-05 ||| 0-0 1-0 1-1 2-2 3-3 ||| 33 3
' access to satellite TV , ||| canali censurati ||| 0.166667 2.4734e-10 0.5 1.35061e-17 ||| 0-1 ||| 6 2
Decoding
Translation model for PBMT
Let’s look at a simple example with no distortion
Translation Options
Look up possible phrase translations
Hypothesis Expansion
Start with empty hypothesis
e:
f: ---
p: 1
Hypothesis Expansion
Pick translation option
Create hypothesis
e:
f: ---------
p: 1
e: Mary
f: *--------
p: .534
Maria | no | dió | una | bofetada | a | la | bruja | verde | ||||||||||||
Mary | | not | | give | | a | | slap | | to | | the | | witch | | green | ||||
| did not | | a slap | | by | | green witch | |||||||||||||
| no | | slap | | to the | | ||||||||||||||
| did not give | | | to | | |||||||||||||||
| | slap | | the witch | | |||||||||||||||
Hypothesis Expansion
Add another hypothesis
e:
f: ---------
p: 1
e: witch
f: -------*-
p: .182
Maria | no | dió | una | bofetada | a | la | bruja | verde | ||||||||||||
Mary | | not | | give | | a | | slap | | to | | the | | witch | | green | ||||
| did not | | a slap | | by | | green witch | |||||||||||||
| no | | slap | | to the | | ||||||||||||||
| did not give | | | to | | |||||||||||||||
| | slap | | the witch | | |||||||||||||||
e: Mary
f: *--------
p: .534
Hypothesis Expansion
Add further hypothesis
e:
f: ---------
p: 1
e: witch
f: -------*-
p: .182
Maria | no | dió | una | bofetada | a | la | bruja | verde | ||||||||||||
Mary | | not | | give | | a | | slap | | to | | the | | witch | | green | ||||
| did not | | a slap | | by | | green witch | |||||||||||||
| no | | slap | | to the | | ||||||||||||||
| did not give | | | to | | |||||||||||||||
| | slap | | the witch | | |||||||||||||||
e: Mary
f: *--------
p: .534
e: slap
f: *-**----
p: .043
Hypothesis Expansion
... until all foreign words covered
e:
f: ---------
p: 1
e: witch
f: -------*-
p: .182
Maria | no | dió | una | bofetada | a | la | bruja | verde | ||||||||||||
Mary | | not | | give | | a | | slap | | to | | the | | witch | | green | ||||
| did not | | a slap | | by | | green witch | |||||||||||||
| no | | slap | | to the | | ||||||||||||||
| did not give | | | to | | |||||||||||||||
| | slap | | the witch | | |||||||||||||||
e: Mary
f: *--------
p: .534
e: slap
f: *-**----
p: .043
e: did not
f: **------
p: .043
e: slap
f: *****--
p: .015
e: the
f: ******--
p: .0942
e: green witch
f: ********
p: .0027
Hypothesis Expansion
Adding more hypothesis
Explosion of search space
e:
f: ---------
p: 1
e: witch
f: -------*-
p: .182
Maria | no | dió | una | bofetada | a | la | bruja | verde | ||||||||||||
Mary | | not | | give | | a | | slap | | to | | the | | witch | | green | ||||
| did not | | a slap | | by | | green witch | |||||||||||||
| no | | slap | | to the | | ||||||||||||||
| did not give | | | to | | |||||||||||||||
| | slap | | the witch | | |||||||||||||||
e: Mary
f: *--------
p: .534
e: slap
f: *-**----
p: .043
e: did not
f: **------
p: .043
e: slap
f: *****--
p: .015
e: the
f: ******--
p: .0942
e: green witch
f: ********
p: .0027
Explosion of search space
Hypothesis Recombination
Different paths to the same translation
Hypothesis Recombination
Different paths to the same partial translation
Combine paths
Hypothesis Recombination
Recombined hypotheses do not have to match completely
No matter what is added, weaker path can be dropped, if:
Hypothesis Recombination
Pruning
Hypothesis Stack
Organization of hypothesis into stacks
Comparing Hypothesis
Comparing hypotheses with same number of foreign words covered
Hypothesis that covers easy part of sentence is preferred
Need to consider future cost of uncovered parts
Future Cost Estimation: Step 2
Estimate cost to translate remaining part of input
Step 1: estimate future cost for each translation option
→ LM * TM = p(to) * p(the|to) * p(to the|a la)
a la
to the
Future Cost Estimation: Step 2
Step 2: find cheapest cost among translation options
a la
to the
to
the
cost: 0.0372
cost: 0.0299
cost: 0.0354
Future Cost Estimation: Step 3
Step 3: find cheapest future cost path for each span
Application
Use future cost estimates when pruning hypotheses
For each uncovered contiguous span:
Limits on Reordering
Sample N-Best List
Translation ||| Reordering LM TM WordPenalty ||| Score
this is a small house ||| 0 -27.0908 -1.83258 -5 ||| -28.9234
this is a little house ||| 0 -28.1791 -1.83258 -5 ||| -30.0117
it is a small house ||| 0 -27.108 -3.21888 -5 ||| -30.3268
it is a little house ||| 0 -28.1963 -3.21888 -5 ||| -31.4152
this is an small house ||| 0 -31.7294 -1.83258 -5 ||| -33.562
it is an small house ||| 0 -32.3094 -3.21888 -5 ||| -35.5283
this is an little house ||| 0 -33.7639 -1.83258 -5 ||| -35.5965
this is a house small ||| -3 -31.4851 -1.83258 -5 ||| -36.3176
this is a house little ||| -3 -31.5689 -1.83258 -5 ||| -36.4015
it is an little house ||| 0 -34.3439 -3.21888 -5 ||| -37.5628
it is a house small ||| -3 -31.5022 -3.21888 -5 ||| -37.7211
this is an house small ||| -3 -32.8999 -1.83258 -5 ||| -37.7325
it is a house little ||| -3 -31.586 -3.21888 -5 ||| -37.8049
this is an house little ||| -3 -32.9837 -1.83258 -5 ||| -37.8163
the house is a little ||| -7 -28.5107 -2.52573 -5 ||| -38.0364
the is a small house ||| 0 -35.6899 -2.52573 -5 ||| -38.2156
Evaluation
Evaluating MT
Slide from Ray Mooney
Human Evaluation of MT
Ask humans to estimate MT output on several dimensions.
Slide from Ray Mooney
Computer-Aided Translation Evaluation
Edit cost: Measure the number of changes that a human translator must make to correct the MT output.
Slide from Ray Mooney
Automatic Evaluation of MT
Collect one or more human reference translations of the source.
Compare MT output to these reference translations.
Score result based on similarity to the reference translations.
Slide from Ray Mooney
BLEU (Bilingual Evaluation Understudy)
Determine number of n-grams of various sizes that the MT output shares with the reference translations.
Compute a modified precision measure of the n-grams in MT result.
Slide from Ray Mooney
Reference translation 1: �The U.S. island of Guam is maintaining a high state of alert after the Guam airport and its offices both received an e-mail from someone calling himself the Saudi Arabian Osama bin Laden and threatening a biological/chemical attack against public places such as the airport .
Reference translation 3: �The US International Airport of Guam and its office has received an email from a self-claimed Arabian millionaire named Laden , which threatens to launch a biochemical attack on such public places as airport . Guam authority has been on alert .
Reference translation 4: �US Guam International Airport and its office received an email from Mr. Bin Laden and other rich businessman from Saudi Arabia . They said there would be biochemistry air raid to Guam Airport and other public places . Guam needs to be in high precaution about this matter .
Reference translation 2: �Guam International Airport and its offices are maintaining a high state of alert after receiving an e-mail that was from a person claiming to be the wealthy Saudi Arabian businessman Bin Laden and that threatened to launch a biological and chemical attack on the airport and other public places .
Machine translation: �The American [?] international airport and its the office all receives one calls self the sand Arab rich business [?] and so on electronic mail , which sends out ; The threat will be able after public place and so on the airport to start the biochemistry attack , [?] highly alerts after the maintenance.
Multiple Reference Translations
Reference translation 1: �The U.S. island of Guam is maintaining a high state of alert after the Guam airport and its offices both received an e-mail from someone calling himself the Saudi Arabian Osama bin Laden and threatening a biological/chemical attack against public places such as the airport .
Reference translation 3: �The US International Airport of Guam and its office has received an email from a self-claimed Arabian millionaire named Laden , which threatens to launch a biochemical attack on such public places as airport . Guam authority has been on alert .
Reference translation 4: �US Guam International Airport and its office received an email from Mr. Bin Laden and other rich businessman from Saudi Arabia . They said there would be biochemistry air raid to Guam Airport and other public places . Guam needs to be in high precaution about this matter .
Reference translation 2: �Guam International Airport and its offices are maintaining a high state of alert after receiving an e-mail that was from a person claiming to be the wealthy Saudi Arabian businessman Bin Laden and that threatened to launch a biological and chemical attack on the airport and other public places .
Machine translation: �The American [?] international airport and its the office all receives one calls self the sand Arab rich business [?] and so on electronic mail , which sends out ; The threat will be able after public place and so on the airport to start the biochemistry attack , [?] highly alerts after the maintenance.
Slide from Bonnie Dorr
BLEU Example
Cand 1: Mary no slap the witch green
Cand 2: Mary did not give a smack to a green witch.
Ref 1: Mary did not slap the green witch.
Ref 2: Mary did not smack the green witch.
Ref 3: Mary did not hit a green sorceress.
Cand 1 Unigram Precision: 5/6
Slide from Ray Mooney
BLEU Example
Cand 1 Bigram Precision: 1/5
Cand 1: Mary no slap the witch green.
Cand 2: Mary did not give a smack to a green witch.
Ref 1: Mary did not slap the green witch.
Ref 2: Mary did not smack the green witch.
Ref 3: Mary did not hit a green sorceress.
Slide from Ray Mooney
BLEU Example
Clip match count of each n-gram to maximum
count of the n-gram in any single reference
translation
Ref 1: Mary did not slap the green witch.
Ref 2: Mary did not smack the green witch.
Ref 3: Mary did not hit a green sorceress.
Cand 1: Mary no slap the witch green.
Cand 2: Mary did not give a smack to a green witch.
Cand 2 Unigram Precision: 7/10
Slide from Ray Mooney
BLEU Example
Ref 1: Mary did not slap the green witch.
Ref 2: Mary did not smack the green witch.
Ref 3: Mary did not hit a green sorceress.
Cand 2 Bigram Precision: 3/9 =1/3
Cand 1: Mary no slap the witch green.
Cand 2: Mary did not give a smack to a green witch.
Slide from Ray Mooney
Modified N-Gram Precision
Average n-gram precision over all n-grams up to size N (typically 4) using geometric mean.
Cand 1:
Cand 2:
Slide from Ray Mooney
Brevity Penalty
Slide from Ray Mooney
BLEU Score
Cand 1: Mary no slap the witch green.
Best Ref: Mary did not slap the green witch.
Cand 2: Mary did not give a smack to a green witch.
Best Ref: Mary did not smack the green witch.
Slide from Ray Mooney
BLEU Score Issues
Slide from Ray Mooney
BLEU Tends to Predict Human Judgments
slide from G. Doddington
(variant of BLEU)
Syntax-Based Statistical Machine Translation
Slide from Ray Mooney
Synchronous Grammar
Slide from Ray Mooney
Synchronous Productions
X 🡪 X 是甚麼 / What is X
Chinese:
English:
Slide from Ray Mooney
Syntax-Based MT Example
Input: 俄亥俄州的首府是甚麼?
Slide from Ray Mooney
Syntax-Based MT Example
X
X
Input: 俄亥俄州的首府是甚麼?
Slide from Ray Mooney
Syntax-Based MT Example
What is X
X
X
X 是甚麼
Input: 俄亥俄州的首府是甚麼?
X 🡪 X 是甚麼 / What is X
Slide from Ray Mooney
Syntax-Based MT Example
X 首府
What is X
the capital X
X
X
X 是甚麼
Input: 俄亥俄州的首府是甚麼?
X 🡪 X 首府 / the capital X
Slide from Ray Mooney
Syntax-Based MT Example
X 首府
What is X
the capital X
of X
X
X
X 是甚麼
X 的
Input: 俄亥俄州的首府是甚麼?
X 🡪 X 的 / of X
Slide from Ray Mooney
Syntax-Based MT Example
X 首府
What is X
the capital X
of X
Ohio
X
俄亥俄州
X
X 是甚麼
X 的
Input: 俄亥俄州的首府是甚麼?
X 🡪 俄亥俄州 / Ohio
Slide from Ray Mooney
Syntax-Based MT Example
X 首府
What is X
the capital X
of X
Ohio
X
俄亥俄州
X
X 是甚麼
X 的
Input: 俄亥俄州的首府是甚麼?
Output: What is the capital of Ohio?
Slide from Ray Mooney
Synchronous Derivations and Translation Model
Slide from Ray Mooney
Use of Dependency parsing
MERT
Minimum Error Rate Training
Slide from Ray Mooney
Conclusions
Slide from Ray Mooney