0

在我的笔记本电脑(Ubuntu13.04)中成功安装 moses 后,我尝试运行示例模型(第一次运行 moses)。

我 wget 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)

这是短语-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的新手,不知道为什么会出现这个错误。谁能帮我解决这个问题?或者告诉我moses.ini中每个 args 的含义?

4

2 回答 2

0

您似乎正在使用最新版本的 Moses (v2.1) 和来自 Moses v1 的配置文件。配置文件 (moses.ini) 的格式发生了重大变化。您可以使用以下命令转换旧式配置文件: scripts/training/convert-moses-ini-to-v2.perl < IN > OUT

于 2014-04-29T15:54:22.060 回答
0

实际上,我认为您遇到了 Alexandru 建议的相反问题。如果您确实拥有 Moses v2.1,它应该向后兼容 Moses v1 配置文件。

因此,我认为您一定已经安装了已弃用的 Moses 1.0。您必须安装摩西 2.1。来自网站的 sample-models.tgz 压缩包也包含新格式的配置文件。

从源头安装摩西可能会很痛苦。但是在您的 Linux 机器上,您应该能够安装以下 Debian 软件包: http: //www.statmt.org/~jie/linux/moses-2.1-1/moses_2.1-1_amd64.deb

取自这里:http ://www.statmt.org/moses/?n=Moses.Packages

于 2014-05-03T20:19:19.160 回答