Phrasebase Statistical Machine Translation 2008 829 D 2
Phrase-base Statistical Machine Translation 2008年 8月29日 勉強会 D 2 中澤 敏明
参考文献 • “Statistical Phrase-Based Translation”, Koehn et al. , HLT/NAACL 2003 – http: //www. iccs. inf. ed. ac. uk/~pkoehn/publications/phrase 2003. pdf • Statistical Machine Translation: the basic, the novel, and the speculative, Philipp Koehn, Tutorial at EACL 2006 – http: //www. iccs. inf. ed. ac. uk/~pkoehn/publications/tutorial 2006. pdf • SMT講習会の資料 by 山本幹雄先生 – http: //iflab. slis. tsukuba. ac. jp/fujii/ntc 7 patmt/SMT_tutorial 2007/myama. pdf
今日話すこと 1. Training i. 対象化単語アライメント ii. フレーズ抽出 iii. フレーズ翻訳確率などの計算(Log-linear Model) 2. MERT (Minimum Error Rate Training) 3. Decoding i. Decoding Process ii. Multistack Beam-search
実習 1. 言語モデルの構築 – srilmというツールを利用 – http: //www. speech. sri. com/projects/srilm/ – ngram-count -order 5 -interpolate -kndiscount -text /avocado 3/moses/data/train_lm. ja -lm 1 M. ja. lm
実習 2. 翻訳モデルの構築 – 双方向でのGIZA++から翻訳モデルの構築まで – train-factored-phrase-model. perl -scripts-root-dir /avocado 3/moses/scripts -corpus. . /data/train -f en -e ja -alignment grow-diag-final-and -reordering msd-bidirectional-fe -lm 0: 5: /avocado 3/moses/lm/1 M. ja. lm: 0 -factor-delimiter ‘|||’
今日話すこと 1. Training i. 対象化単語アライメント ii. フレーズ抽出 iii. フレーズ翻訳確率などの計算(Log-linear Model) 2. MERT (Minimum Error Rate Training) 3. Decoding i. Decoding Process ii. Multistack Beam-search
対称化単語アライメント Intersection Union Precision High Low Recall Low High
intersection
grow-diag-final
abstract code diag
Log-linear Model • Feature functions(moses default: 14 params) – language model (1 param) – phrase translation table (5 params) – reordering model (7 params) – word penalty (1 param)
phrase translation table • 5 parameters – phrase translation probability – lexical weighting – phrase penalty
lexicalized reordering • MSD vs monotonicity – monotone, swap, discontinuous – monotone, non-monotone • f vs fe – model is conditioned on f vs both f and e • unidirectional vs bidirectional – For each phrase, the ordering of itself in respect to the previous is considered. For bidirectional models, also the ordering of the next phrase in respect to the currect phrase is modeled.
reordering model • 7 parameters (msd-bidirectional-fe) – – – – simple distance-base model
Log-linear Model • Feature functions – language model (1 param) – phrase translation table (5 params) – reordering model (7 params) – word penalty (1 param) 0. 5 0. 2 0. 3 -1
今日話すこと 1. Training i. 対象化単語アライメント ii. フレーズ抽出 iii. フレーズ翻訳確率などの計算(Log-linear Model) 2. MERT (Minimum Error Rate Training) 3. Decoding i. Decoding Process ii. Multistack Beam-search
実習 3. チューニング(MERT) – development setを用いてlog-linear modelのλを BLEUが向上するように調整 – mert-moses. pl --rootdir /avocado 3/moses/scripts --working-dir. . . /data/dev. en. . /data/dev. ja /share/usr-x 86_64/bin/moses. . /tm/model/moses. ini
Param Default 1 2 3 6 9 12 13 BLEU --- 14. 0 14. 4 17. 5 21. 5 22. 1 LM 0. 5 1 0. 039 0. 038 0. 104 0. 047 0. 052 0. 051 TM 1 0. 2 0. 3 0. 011 0. 010 0. 042 0. 012 0. 042 TM 2 0. 020 0. 031 0. 038 0. 031 TM 3 0. 2 0. 3 0. 051 0. 049 0. 030 0. 008 0. 034 TM 4 0. 2 0. 016 0. 068 0. 011 0. 018 0. 016 TM 5 0. 2 0 0. 003 0. 034 -0. 055 0. 114 D 1 0. 3 1 -0. 001 0. 017 -0. 004 0. 005 D 2 0. 3 1 -0. 065 -0. 061 0. 034 0. 087 0. 045 0. 044 D 3 0. 3 1 -0. 191 -0. 186 0. 058 -0. 032 0. 109 0. 108 D 4 0. 3 1 0. 055 0. 008 0. 133 0. 383 0. 215 D 5 0. 3 1 -0. 004 -0. 010 0. 133 0. 025 0. 123 D 6 0. 3 1 0. 045 0. 062 0. 122 -0. 007 -0. 009 D 7 0. 3 1 0. 062 0. 072 0. 130 0. 085 0. 134 0. 133 W -1 0 -0. 438 -0. 428 -0. 181 -0. 084 -0. 074
今日話すこと 1. Training i. 対象化単語アライメント ii. フレーズ抽出 iii. フレーズ翻訳確率などの計算(Log-linear Model) 2. MERT (Minimum Error Rate Training) 3. Decoding i. Decoding Process ii. Multistack Beam-search
実習 4. 翻訳 – MERTによって調整されたλを用いて翻訳 – phrase table全てを読み込むとメモリが足らなくなる ので、翻訳する文に必要なphrase tableのみをあら かじめfiltering – filter-model-given-input. pl filterd. . /tune/moses. ini. . /data/test. ja – filteringされたphrase tableを用いて翻訳 – moses -f filterd/moses. ini <. . /data/test. en
Decoding Input sentence: Maria no Mary did not Output sentence: dio una slap bofetada a la the bruja verde green witch
- Slides: 38