踩了两周的坑今天终于解决了,本来觉得晚上关于GIZA++生成对齐文件的教程已经很多了没准备写,但是因为我的这个坑我不得不记录一下。利用GIZA++获得单向对齐文件的同时会获得双语词表,但是我从始至终都没看到哪里有什么双语词表。
然后研究了三四天的moses,关于moses的整体步骤分为以下几步:
-
Prepare data
-
Run GIZA++
-
Align words
-
Get lexical translation table
-
Extract phrases
-
Score phrases
-
Build reordering model
-
Build generation models
-
Create configuration file
在寒小阳的这篇文章https://blog.csdn.net/han_xiaoyang/article/details/10112075 第四点中看到:
我以为这个是双语词表,然后就把moses的整个运行研究了一遍,终于获得了lex.e2f 和lex.f2e两个词表,本以为自己需要的东西终于获得了,然而我想多了,看看这些结果:
一点都不准确,根本不能用。后来再去研究moses的时候,发现里面说了这么一句话:
moses官网说明:在第二步 run giza++的时候就可以得到一个IBM4的翻译表
GIZA++ learns the translation tables of IBM Model 4, but we are only interested in the word alignment file:
也就是说