After successfully installing moses in my laptop(Ubuntu13.04), I try to run the sample-models(Run moses for the first time).

I wget sample-models.tgz and extract it in the folder. And then run the command:

~/mosesdecoder/bin/moses -f phrase-model/moses.ini < phrase-model/in > out

And it failed with the following error:

[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)

Here's the 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

I'm a newbie to moses and have no idea that why this error appears. Could anyone help me with this? Or tell me what every args means in the moses.ini?

有帮助吗?

解决方案

Actually I think you have the reverse problem of what Alexandru suggested. If you indeed have Moses v2.1, it should be backward-compatible with Moses v1 configuration files.

Therefore I think you must have installed the deprecated Moses 1.0. You must install Moses 2.1. The sample-models.tgz tarball from the website also contains configuration files in the new format.

Installing Moses from the source can be a pain. But on your Linux machine you should be able to install the following Debian package: http://www.statmt.org/~jie/linux/moses-2.1-1/moses_2.1-1_amd64.deb

Taken from here: http://www.statmt.org/moses/?n=Moses.Packages

其他提示

It seems like you are using the latest version of Moses (v2.1) with a configuration file from Moses v1. There was a major change in the format of the configuration files (moses.ini). You can convert the old-style configuration files with: scripts/training/convert-moses-ini-to-v2.perl < IN > OUT

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top