Machine Translation with Inferred Stochastic Finite-State Transducers

Ähnliche Dokumente
Formale Sprachen. Reguläre Sprachen. Rudolf FREUND, Marian KOGLER

Einführung in die Computerlinguistik

Der Viterbi-Algorithmus im Part-of-Speech Tagging

Grundlagen der Theoretischen Informatik

Maschinelle Übersetzung

Hidden Markov Models

Operationen auf endlichen Akzeptoren und Transduktoren

Endliche Automaten. Endliche Automaten J. Blömer 1/24

Operationen auf endlichen Automaten und Transduktoren

Endliche Automaten. Endliche Automaten J. Blömer 1/23

Formale Methoden 1. Gerhard Jäger 9. Januar Uni Bielefeld, WS 2007/2008 1/23

Operationen auf endlichen Akzeptoren und Transduktoren

5.2 Endliche Automaten

Wortdekodierung. Vorlesungsunterlagen Speech Communication 2, SS Franz Pernkopf/Erhard Rank

Induktive Definition

Einführung in die Computerlinguistik reguläre Sprachen und endliche Automaten

Sprachsynthese: Textnormalisierung

Automaten und Formale Sprachen SoSe 2007 in Trier. Henning Fernau Universität Trier

4. Bayes Spiele. S i = Strategiemenge für Spieler i, S = S 1... S n. T i = Typmenge für Spieler i, T = T 1... T n

Einführung in die Computerlinguistik reguläre Sprachen und endliche Automaten

Softwareprojektpraktikum Maschinelle Übersetzung

Tagging mit Hidden Markov Models und Viterbi-Algorithmus

2 2 Reguläre Sprachen. 2.2 Endliche Automaten. Übersicht

Endliche Automaten. Minimierung. Karin Haenelt. Karin Haenelt, 2004, FSA-Minimierung, ( )

2 Halbgruppen von Übergangswahrscheinlichkeiten. Markov-Prozesse

Evaluation und Training von HMMs

2.6 Verdeutlichung verwendeter Begriffe

Informatik III. Christian Schindelhauer Wintersemester 2006/07 8. Vorlesung

Einführung in die Computerlinguistik reguläre Sprachen und endliche Automaten

Einführung in die Computerlinguistik reguläre Sprachen und endliche Automaten

Zufällige stabile Prozesse und stabile stochastische Integrale. Stochastikseminar, Dezember 2011

Informatik III. Christian Schindelhauer Wintersemester 2006/07 3. Vorlesung

Learning regular sets from queries and counterexamples

Endliche Automaten. Im Hauptseminar Neuronale Netze LMU München, WS 2016/17

Probeklausur Lösungen

1 Σ endliches Terminalalphabet, 2 V endliche Menge von Variablen (mit V Σ = ), 3 P (V (Σ ΣV )) {(S, ε)} endliche Menge von Regeln,

Sprachsynthese: Textnormalisierung

Einführung in die Computerlinguistik Satz von Kleene

Informatik III. Christian Schindelhauer Wintersemester 2006/07 7. Vorlesung

Maschinelles Übersetzen natürlicher Sprachen 2. Praktikum. SS 2012 Torsten Stüber

κ Κα π Κ α α Κ Α

Dienstleistungsmanagement Übung 5

WS06/07 Referentin: Katharina Blinova. Formale Sprachen. Hauptseminar Intelligente Systeme Dozent: Prof. Dr. J. Rolshoven

Der Earley-Algorithmus

1 Σ endliches Terminalalphabet, 2 V endliche Menge von Variablen (mit V Σ = ), 3 P (V (Σ ΣV )) {(S, ε)} endliche Menge von Regeln,

Informationsextraktion mit endlichen Automaten

Der Earley-Algorithmus

Nachklausur zur Vorlesung Theoretische Grundlagen der Informatik Wintersemester 2013/14

Stochastic Processes SS 2010 Prof. Anton Wakolbinger. Klausur am 16. Juli 2010

1 Einführung. 2 Typ-0- und Typ-1-Sprachen. 3 Berechnungsmodelle. 4 Unentscheidbarkeit. 5 Unentscheidbare Probleme. 6 Komplexitätstheorie

Grundlagen der Theoretischen Informatik / Einführung in die Theoretische Informatik I

Automatentheorie und formale Sprachen endliche Automaten

Hidden-Markov-Modelle als Gewichtete Endliche Automaten

Kapitel 4. Stochastische Grundlagen. 4.1 Filtrationen und Stoppzeiten

Automatentheorie und formale Sprachen reguläre Ausdrücke

ALP I Turing-Maschine

Der Viterbi Algorithmus

c) {abcde, abcfg, bcade, bcafg} d) {ade, afg, bcde, bcfg} c) {abcabc} d) {abcbc, abc, a} c) {aa, ab, ba, bb} d) {{aa}, {ab}, {ba}, {bb}}

Automaten und Formale Sprachen SoSe 2013 in Trier

Extraktion von Preordering-Regeln für Maschinelle Übersetzung

Fakultät für Informatik Universität Magdeburg Jürgen Dassow. Literatur

2. Gegeben sei folgender nichtdeterministischer endlicher Automat mit ɛ-übergängen:

Grundlagen der Informatik II

Einführung in die Computerlinguistik

Seminarvortrag zum Thema ω-automaten. Simon Kostede & Markku Lammerz

1 Einführung. 2 Typ-0- und Typ-1-Sprachen. 3 Berechnungsmodelle. 4 Unentscheidbarkeit. 5 Unentscheidbare Probleme. 6 Komplexitätstheorie

Formale Grundlagen der Wirtschaftsinformatik

Automaten und formale Sprachen Klausurvorbereitung

Automatentheorie und formale Sprachen rechtslineare Grammatiken

Informatik II, SS 2018

1 Einführung. 2 Typ-0- und Typ-1-Sprachen. 3 Berechnungsmodelle. 4 Unentscheidbarkeit. 5 Unentscheidbare Probleme. 6 Komplexitätstheorie

Algorithmen mit konstantem Platzbedarf: Die Klasse REG

2.2 Reguläre Sprachen Endliche Automaten

Universität Potsdam Institut für Informatik Lehrstuhl Maschinelles Lernen. Übersetzung. Tobias Scheffer Michael Großhans Paul Prasse Uwe Dick

Einführung in die Computerlinguistik

Übersicht. 3 3 Kontextfreie Sprachen

Temporal Difference Learning

Einführung in die Computerlinguistik

FORMALE SYSTEME. Wiederholung. Beispiel: NFA. Wiederholung: NFA. 4. Vorlesung: Nichtdeterministische Endliche Automaten. TU Dresden, 19.

Pat Trees und Pat Arrays Datenstrukturen zur effizienten Suche in Texten

Determinisierung von endlichen Automaten

Einführung in die Computerlinguistik

Operationen auf endlichen Automaten und Transduktoren

Lexikalische Programmanalyse der Scanner

Einführung in die Informatik

Hidden Markov Models (HMM)

Informatik IV Theoretische Informatik: Formale Sprachen und Automaten, Berechenbarkeit und NP-Vollständigkeit. Zugangsnummer: 9201

Automaten und Formale Sprachen SoSe 2013 in Trier

FORMALE SYSTEME. Wiederholung. Beispiel: NFA. Wiederholung: NFA. 4. Vorlesung: Nichtdeterministische Endliche Automaten. TU Dresden, 20.

Die mathematische Seite

ALP I Turing-Maschine

Hawkes Prozesse Grundlagen

Einführung in die Computerlinguistik

Teil 2.2: Lernen formaler Sprachen: Hypothesenräume

Der VITERBI-Algorithmus

Kapitel 3: Reguläre Grammatiken und Endliche. Automaten

Akzeptierende Turing-Maschine

Diskrete Mathematik. Anna-Lena Rädler Christina Kohl Georg Moser Christian Sternagel Vincent van Oostrom

Transkript:

Machine Translation with Inferred Stochastic Finite-State Transducers von Klaus Suttner HS: Endliche Automaten Dozentin: Karin Haenelt Seminar für Computerlinguistik Universität Heidelberg 29.06.09

Finite-state Transducer Definition Ein Finite-state Transducer ist ein Tupel T : Σ,, Q, q 0, F, δ Σ = Eingabealphabet = Ausgabealphabet Q = Menge von Zuständen q 0 = Startzustand F Q = Menge von Endzuständen δ Q Σ Q φ heißt eine Übersetzung von s, falls: φ = (φ 0, s 1, t 1, φ 1 )(φ 1, s 2, t 2, φ 2 )... (φ l 1, s l, t l, φ l ) mit s = l d(s, t) bezeichne alle Übersetzungen des Paars (s, t).

Stochastic Finite-state Transducer Definition Ein Stochastic Finite-state Transducer ist ein Tupel T : Σ,, Q, q 0, F, p, f mit der Erweiterung: p : Q Σ Q [0, 1] f : Q [0, 1] und den Eigenschaften: q Q : f (q) + p(q, a, ω, q ) = 1 (a,ω,q ) Σ Q P Tp (s, t) = 1 (s,t) Σ

Stochastic Finite-state Transducer Wahrscheinlichkeit einer Übersetzung (s, t): P Tp (s, t) = P Tp (φ) φ d(s,t) l P Tp (φ) = f (q l ) p(q i 1, s i, t i, q i ) i=0 Übersetzung einer Zeichenkette s: ˆt = arg max t P T p (s, t)

Viterbi-Approximation Approximation: P Tp V Tp (s, t) = max P Tp (φ) φ d(s,t) t = arg max V T t p (s, t) = arg max max t φ d(s,t) P Tp (φ) Berechnung: max V T t p (s, t) = max(v ( s, q)f (q)) q Q V (i, q) = max q Q,ω (V (i 1, q )p(q, s i, ω, q)), i 0, q q 0 V (0, q 0 ) = 1

Verfahren jeder Paar (s, t) Zeichenkette z Induktion einer regulären Grammatik Erzeugung des Transducers

Übersetzung IBM-Modell 1-5 e(i) = i-te Wort des Originalsatzes (hier: englisch) f(j) = j-te Wort des Zielsatzes (hier: französisch) a(i) = Alignierung für Wort i des Originalsatzes Fertility φ spurious words p 1 Position NULL = e 0 Distortion d(a(i) e i, s, t ) d(5 2, 4, 6) Translation t e i f a(i)

IBM-Modell 3 1 For each English word e i indexed by i = 1...l, choose fertility φ(i) with probability n(φ(e i ) e i ). 2 Choose the number φ(0) of "spurious" French words to be generated from e 0 = NULL using probability p 1 and n i=1 φ(i) from step 1. 3 Let m m = n i=0 φ(i) be the sum of fertilities for all words, including NULL. 4 For each i = 0...l, and each k = 1...φ(i), choose a French word τ ik with probability t(τ ik e i ). 5 For each i = 1...l, and each k = 1...φ(i), choose target French position π ik with probability d(π ik i, l, m). 6 For each k = 1...φ 0, choose a position π 0k from the φ(0) k + 1 remaining vacant positions in 1...m, for a total probability of 1 φ(0)!. 7 Output the French sentence with words τ ik in positions π ik (0 i l, 1 k φ(i)).

IBM-Modell 3 Beispiel input : Mary did not slap the green witch choose fertilities: Mary not slap slap slap the green witch choose number of spurious words: Mary not slap slap slap NULL the green witch choose translations: Mary no daba una bofetada a la verde bruja choose target positions: Mary no daba una bofetada a la bruja verde

EM-Algorithmus Beispiel Satz 1: Align. 1: Satz 2: Align. 2: X b y t(x b) = 1 2 t(y b) = 1 2 t(x c) = 1 2 t(y c) = 1 2

EM-Algorithmus Beispiel Satz 1: Align. 1: Satz 2: t(x b) = 1 2 t(y b) = 1 2 t(x c) = 1 2 t(y c) = 1 2 Align. 2: X b y P(a, f e) = 1 2 1 2 1 2 = 1 8 P(a, f e) = 1 2 1 2 1 2 = 1 8 P(a, f e) = 1 2

EM-Algorithmus Beispiel Satz 1: Align. 1: Satz 2: t(x b) = 1 2 t(y b) = 1 2 t(x c) = 1 2 t(y c) = 1 2 Align. 2: X b y P(a, f e) = 1 8 P(a, f e) = 1 8 P(a, f e) = 1 2

EM-Algorithmus Beispiel Satz 1: Align. 1: Satz 2: Align. 2: X b y P(a, f e) = 1 8 P(a f, e) = 1 8 2 8 P(a, f e) = 1 8 P(a f, e) = 1 8 2 8 P(a, f e) = 1 2 P(a f, e) = 1 2 1 2 = 1 2 = 1 2 = 1 t(x b) = 1 2 t(y b) = 1 2 t(x c) = 1 2 t(y c) = 1 2

EM-Algorithmus Beispiel Satz 1: Align. 1: Satz 2: Align. 2: X b y P(a, f e) = 1 8 P(a f, e) = 1 8 2 8 P(a, f e) = 1 8 P(a f, e) = 1 8 2 8 P(a, f e) = 1 2 P(a f, e) = 1 2 1 2 Zähle Treffer (counts): tc(x b) = 1 2 tc(y b) = 1 + 1 = 3 2 2 tc(x c) = 1 2 = 1 2 = 1 2 = 1 t(x b) = 1 2 tc(y c) = 1 2 t(y b) = 1 2 t(x c) = 1 2 t(y c) = 1 2

EM-Algorithmus Beispiel Satz 1: Align. 1: Satz 2: Align. 2: X b y P(a, f e) = 1 8 P(a f, e) = 1 8 2 8 P(a, f e) = 1 8 P(a f, e) = 1 8 2 8 P(a, f e) = 1 2 P(a f, e) = 1 2 1 2 Zähle Treffer (counts): tc(x b) = 1 2 tc(y b) = 3 2 tc(x c) = 1 2 = 1 2 = 1 2 = 1 t(x b) = 1 2 tc(y c) = 1 2 t(y b) = 1 2 t(x c) = 1 2 t(y c) = 1 2

EM-Algorithmus Beispiel Satz 1: Align. 1: Satz 2: t(x b) = 1 2 t(y b) = 1 2 t(x c) = 1 2 t(y c) = 1 2 Align. 2: X b y P(a, f e) = 1 8 P(a f, e) = 1 8 2 8 P(a, f e) = 1 8 P(a f, e) = 1 8 2 8 P(a, f e) = 1 2 P(a f, e) = 1 2 1 2 tc(x b) = 1 2 Normalisiere: = 1 2 = 1 2 = 1 t(x b) = t(x b) t( b) = 1 2 42 tc(y b) = 3 2 t(y b) = 3 2 42 = 3 4 tc(x c) = 1 2 t(x c) = 1 2 1 = 1 2 tc(y c) = 1 2 t(y c) = 1 2 1 = 1 2

EM-Algorithmus Beispiel Satz 1: Align. 1: Satz 2: t(x b) = 1 4 t(y b) = 3 4 t(x c) = 1 2 t(y c) = 1 2 Align. 2: X b y P(a, f e) = 1 8 P(a f, e) = 1 8 2 8 = 1 2 P(a, f e) = 1 8 P(a f, e) = 1 8 2 8 = 1 2 P(a, f e) = 1 2 P(a f, e) = 1 2 1 2 = 1 Normalisiere: tc(x b) = 1 2 t(x b) = 1 2 42 = 1 4 tc(y b) = 3 2 t(y b) = 3 2 42 = 3 4 tc(x c) = 1 2 t(x c) = 1 2 1 = 1 2 tc(y c) = 1 2 t(y c) = 1 2 1 = 1 2

EM-Algorithmus Beispiel Satz 1: Align. 1: Satz 2: t(x b) = 1 4 t(y b) = 3 4 t(x c) = 1 2 t(y c) = 1 2 Align. 2: X b y P(a, f e) = 1 4 1 2 1 2 = 1 16 P(a, f e) = 3 4 1 2 1 2 = 3 16 P(a, f e) = 3 4

EM-Algorithmus Beispiel Satz 1: Align. 1: Satz 2: t(x b) = 1 4 t(y b) = 3 4 t(x c) = 1 2 t(y c) = 1 2 Align. 2: X b y P(a, f e) = 1 16 P(a, f e) = 3 16 P(a, f e) = 3 4

EM-Algorithmus Beispiel Satz 1: Align. 1: Satz 2: t(x b) = 1 4 t(y b) = 3 4 t(x c) = 1 2 t(y c) = 1 2 Align. 2: X b y P(a, f e) = 1 16 P(a f, e) = 1 16 4 16 P(a, f e) = 3 16 P(a f, e) = 3 16 4 16 P(a, f e) = 3 4 P(a f, e) = 3 4 3 4 = 1 4 = 3 4 = 1

EM-Algorithmus Beispiel Satz 1: Align. 1: Satz 2: t(x b) = 1 4 t(y b) = 3 4 t(x c) = 1 2 t(y c) = 1 2 Align. 2: X b y P(a, f e) = 1 16 P(a f, e) = 1 4 P(a, f e) = 3 16 P(a f, e) = 3 4 P(a, f e) = 3 4 P(a f, e) = 1 Zähle Treffer (counts): tc(x b) = 1 4 tc(y b) = 3 4 + 1 = 7 4 tc(x c) = 3 4 tc(y c) = 1 4

EM-Algorithmus Beispiel Satz 1: Align. 1: Satz 2: t(x b) = 1 4 t(y b) = 3 4 t(x c) = 1 2 t(y c) = 1 2 Align. 2: X b y P(a, f e) = 1 16 P(a f, e) = 1 4 P(a, f e) = 3 16 P(a f, e) = 3 4 P(a, f e) = 3 4 P(a f, e) = 1 Zähle Treffer (counts): tc(x b) = 1 4 tc(y b) = 7 4 tc(x c) = 3 4 tc(y c) = 1 4

EM-Algorithmus Beispiel Satz 1: Align. 1: Satz 2: t(x b) = 1 4 t(y b) = 3 4 t(x c) = 1 2 t(y c) = 1 2 Align. 2: X b y P(a, f e) = 1 16 P(a f, e) = 1 4 P(a, f e) = 3 16 P(a f, e) = 3 4 P(a, f e) = 3 4 P(a f, e) = 1 Normalisiere: tc(x b) = 1 4 t(x b) = 1 4 84 = 1 8 tc(y b) = 7 4 t(y b) = 7 4 84 = 7 8 tc(x c) = 3 4 t(x c) = 3 4 1 = 3 4 tc(y c) = 1 4 t(y c) = 1 4 1 = 1 4

EM-Algorithmus Beispiel Satz 1: Align. 1: Satz 2: t(x b) = 1 8 t(y b) = 7 8 t(x c) = 3 4 t(y c) = 1 4 Align. 2: X b y P(a, f e) = 1 16 P(a f, e) = 1 4 P(a, f e) = 3 16 P(a f, e) = 3 4 P(a, f e) = 3 4 P(a f, e) = 1 Normalisiere: tc(x b) = 1 4 t(x b) = 1 4 84 = 1 8 tc(y b) = 7 4 t(y b) = 7 4 84 = 7 8 tc(x c) = 3 4 t(x c) = 3 4 1 = 3 4 tc(y c) = 1 4 t(y c) = 1 4 1 = 1 4

Beispiel

Segmentierung Beispiel Cuánto cuesta una habitación individual por semana? how(2) much(2) does(3) a(4) single(6) room(5) cost(3) per(7) week(8)?(9)

Segmentierung z = s, 1 i z : (s i, t j t j+1...t j+l ) falls j : a(j) = i und j < j : a(j ) > a(j) z i = und für j : j j j + l, a(j ) a(j) (s i, λ) sonst

Segmentierung z = s, 1 i z : (s i, t j t j+1...t j+l ) falls j : a(j) = i und j < j : a(j ) > a(j) z i = und für j : j j j + l, a(j ) a(j) (s i, λ) sonst Cuánto cuesta una habitación individual por semana? How much does a single room cost per week? (, λ), (Cuánto, how much) (cuesta, does) (una, a) (habitación, λ) (individual, single room cost) (por, per) (semana, week) (?,?)

Segmentierung z = s, 1 i z : (s i, t j t j+1...t j+l ) falls j : a(j) = i und j < j : a(j ) > a(j) z i = und für j : j j j + l, a(j ) a(j) (s i, λ) sonst una camera doppia a(1) double(3) room(2) una camera a(1) room(2) la camera singola the(1) single(3) room(2) la camera the(1) room(2) (una, a) (camera, λ) (doppia, double room) (una, a) (camera, room) (la, the) (camera, λ) (singola, single room) (la, the) (camera, room)

Segmentierung una camera doppia a(1) double(3) room(2) una camera a(1) room(2) la camera singola the(1) single(3) room(2) la camera the(1) room(2) (una, a) (camera, λ) (doppia, double room) (una, a) (camera, room) (la, the) (camera, λ) (singola, single room) (la, the) (camera, room)

Transducer n-gramme Der Übergang (q, a, b 1 b 2...b k, q ) ist im Transducer T enthalten, wenn die beiden Zustände q = (z i n+1...z i 1 ) und q = (z i n+2...z i ) in T existieren und z i = (a, b 1 b 2...b k ). Die Wahrscheinlichkeit ist p(z i z i n+1...z i 1 ). p(z i z i n+1...z i 1 ) = c(z i n+1...z i 1 z i ) c(z i n+1...z i 1 ) Anzahl der Zustände = Anzahl der k-gramme (k < n) Anzahl der Übergänge = Anzahl der k-gramme (k n) + Back-off Anzahl der k-gramme hängt von Segmentierung ab. Monotonie

Smoothing I drove a new car.

Evaluation Gesprächssituation: Hotel WER = Word Error Rate, SER = Sentence Error Rate, BLEU = Anzahl der korrekten n-gramme in % EU-Trans-0: Sätze: Wortschatz: insgesamt 490.000 spanisch 686 unterschiedliche 168.629 englisch 513

Evaluation Gesprächssituation: Hotel WER = Word Error Rate, SER = Sentence Error Rate, BLEU = Anzahl der korrekten n-gramme in % EU-Trans-1a: Sätze: Wortschatz: insgesamt 10.000 spanisch 6.622 unterschiedliche 6.636 deutsch 4.890

Evaluation Übersetzungsbeispiele

Literatur Casacuberta, Francisco, Vidal, Enrique. 2004. Machine translation with inferred stochastic finite-state transducers. Computational Linguistics 30(2):205 225. Brown, Peter F., Stephen A. Della Pietra, Vincent J. Della Pietra, and Robert L. Mercer. 1993. The mathematics of statistical machine translation. Computational Linguistics, 19(2):263 310