在我的笔记本(Ubuntu13.04)中成功安装了摩西之后,我尝试运行示例模型(第一次运行摩西)。
我将获取sample-models.tgz并将其解压缩到文件夹中。然后运行命令:
~/mosesdecoder/bin/moses -f phrase-model/moses.ini < phrase-model/in > out它失败了,出现了以下错误:
[user@my-pc sample-models]$ ~/mosesdecoder/bin/moses -f phrase-model/moses.ini < phrase-model/in > out
Defined parameters (per moses.ini or switch):
config: phrase-model/moses.ini
feature: IRSTLM name=LM factor=0 order=3 num-features=1 path=lm/europarl.srilm.gz Distortion WordPenalty UnknownWordPenalty PhraseDictionaryMemory input-factor=0 output-factor=0 path=phrase-model/phrase-table num-features=1 table-limit=10
input-factors: 0
mapping: T 0
n-best-list: nbest.txt 100
weight: WordPenalty0= 0 LM= 1 Distortion0= 1 PhraseDictionaryMemory0= 1
ERROR:Unknown parameter feature
ERROR:Unknown parameter weight
ERROR:No phrase translation table (ttable-file)这是phrase-model/moses.ini
#########################
### MOSES CONFIG FILE ###
#########################
# input factors
[input-factors]
0
# mapping steps, either (T) translation or (G) generation
[mapping]
T 0
[feature]
IRSTLM name=LM factor=0 order=3 num-features=1 path=lm/europarl.srilm.gz
Distortion
WordPenalty
UnknownWordPenalty
PhraseDictionaryMemory input-factor=0 output-factor=0 path=phrase-model/phrase-table num-features=1 table-limit=10
[weight]
WordPenalty0= 0
LM= 1
Distortion0= 1
PhraseDictionaryMemory0= 1
[n-best-list]
nbest.txt
100我是摩西的新手,不知道为什么会出现这个错误。有人能帮我吗?或者告诉我在moses.ini中每个args是什么意思
发布于 2014-05-03 20:19:19
实际上,我认为你有一个与亚历山大的建议相反的问题。如果您确实有摩西v2.1,它应该向后兼容摩西v1配置文件。
因此,我认为你一定安装了被废弃的摩西1.0。你必须安装摩西2.1。来自网站的示例模型The tarball也包含新格式的配置文件。
从源头上安装摩西可能会很痛苦。但是,在您的Linux计算机上,您应该能够安装以下Debian包:amd64.deb
从这里拍摄:http://www.statmt.org/moses/?n=Moses.Packages
发布于 2014-04-29 15:54:22
看起来,您使用的是摩西的最新版本(v2.1)和来自摩西v1的配置文件。配置文件(moses.ini)的格式发生了重大变化。您可以使用:scripts/training/convert-moses-ini-to-v2.perl < IN > OUT转换旧样式的配置文件。
https://stackoverflow.com/questions/23216442
复制相似问题