Download presentation
Presentation is loading. Please wait.
Published byLambert Barber Modified over 8 years ago
1
NLP
2
Machine Translation
3
Source-channel model of communication Parametric probabilistic models of language and translation
4
Given f, guess e e f E F encoder e’ F E decoder e’ = argmax P(e|f) = argmax P(f|e) P(e) e e translation modellanguage model
5
p(e)p(f|e)p(e)*p(f|e) a flower red red flower a flower red a a red dog dog cat mouse a red flower Translate from French: “une fleur rouge”?
6
p(e)p(f|e)p(e)*p(f|e) a flower redlowhighlow red flower a flower red a a red dog dog cat mouse a red flower Translate from French: “une fleur rouge”?
7
p(e)p(f|e)p(e)*p(f|e) a flower redlowhighlow red flower alowhighlow flower red a a red dog dog cat mouse a red flower Translate from French: “une fleur rouge”?
8
p(e)p(f|e)p(e)*p(f|e) a flower redlowhighlow red flower alowhighlow flower red alowhighlow a red dog dog cat mouse a red flower Translate from French: “une fleur rouge”?
9
p(e)p(f|e)p(e)*p(f|e) a flower redlowhighlow red flower alowhighlow flower red alowhighlow a red doghighlow dog cat mouselow a red flowerhigh Translate from French: “une fleur rouge”?
10
p(Chinese|English) x p(English) ~p(English|Chinese)
11
Text-to-text (summarization) –also text-to-signal, speech recognition, OCR, spelling correction Example (OCR) –P(text|pixels) = P(text) P(pixels|text)
12
I watched an interesting play I watched watched an interesting play play play I watched watched an play play play interesting J’ ai vu une pièce de théâtre intéressante
13
Word translation Local alignment Fertilities Class-based alignment Non-deficient algorithm (avoid overlaps, overflow)
14
Tokenization Sentence alignment (1-1, 2-2, 2-1 mappings) –Church and Gale (based on sentence length) –Church (sequences of 4-grams) – based on cognates
15
[Church/Gale 1993]
16
Alignments –La maison bleue –The blue house –Alignments: {1,2,3}, {1,3,2}, {1,3,3}, {1,1,1} –All are equally likely Conditional probabilities –P(f|A,e) = ?
17
Algorithm –Pick length of translation –Choose an alignment –Pick the French words –That gives you P(f,A|e) –We need P(f|A,e) –Use EM (expectation-maximization) to find the hidden variables
18
We need p(f|e) but we don’t know the word alignments (which are assumed to be equally likely)
19
green house the house casa verde la casa Corpus: Uniform translation model:
20
E-step 1: compute the expected counts E[count(t(f|e))] for all word pairs (f j,e aj ) E-step 1a: compute P(a,f|e) by multiplying all t probabilities using E-step 1b: normalize P(a,f|e) to get P(a|e,f) using E-step 1c: compute expected fractional counts, by weighting each count by P(a|e,f)
21
M-step 1: Compute the MLE probability params by normalizing the tcounts to sum to 1. E-step 2a: Recompute P(a,f|e) again by multiplying the t probabilities More iterations are needed (until convergence)
22
Distortion parameters D(i|j,l,m) –i and j are words in the two sentences –l and m are the lengths of these sentences Example –D(“boy”|”garçon”,5,6)
23
Fertility P( i |e) Examples –(a) play = pièce de théâtre –(to) place = mettre en place p 1 is an extra parameter that defines 0
24
http://www.isi.edu/natural-language/mt/wkbk.rtf (an awesome tutorial by Kevin Knight) http://www.statmt.org/ (a comprehensive site, including references to the old IBM papers, pointers to Moses, etc.)
25
NLP
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.