Moses运行过程记录---Moses语言模型和翻译模型构建(三)

本文详细记录了使用Moses构建从英语到汉语的翻译模型和5-gram语言模型的过程,包括使用ngram-count创建中文5-gram模型、训练翻译模型的9个步骤,并解释了各步骤的作用和所需参数。最后,介绍了训练完成后得到的各文件夹内容,如词汇文件、GIZA++的输出和最终的解码器模型。
摘要由CSDN通过智能技术生成

This time I want to translate English to Chinese, so I choose Chinese as a language model.Go to the directory:/home/tianliang/mosesdecoder/srilm/bin/i686-gcc4, we will use the “ngram-count” to build a 5-gram model. The process is like below:

tianliang@ubuntu:~/mosesdecoder/srilm/bin/i686-gcc4/test$ mkdir test

tianliang@ubuntu:~/mosesdecoder/srilm/bin/i686-gcc4/test$ cd test

tianliang@ubuntu:~/mosesdecoder/srilm/bin/i686-gcc4/test$ ./ngram-count -text clean.chn -lm chinese.gz -order 5 -unk -wbdiscount -interpolate

Here it means: we will build Chinese file “clean.chn” into a 5-gram language model chinese.gz using the smoothing methods called Witten-Bell discounting and interpolated estimates. The chinese.gz looks like:

It shows the number of the n-gram models. For example, there are 594 3-gram models in our corpus.

Moses' toolkit does a great job of wrapping up calls to mkcls and GIZA++ inside a training script, and outputting the phrase and reordering tables needed for decoding. The script that does this is called train-factored-phrase-model.perl. In my running, the train-factored-phrase-model.perl is located at

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值