0

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?

JavaNoScript
  • 2,345
  • 21
  • 27

2 Answers2

0

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

  • Actually I installed Moses-v1 and there's no `scripts/training/convert-moses-ini-to-v2.perl`. @Ali J was right: I use Moses-v1 with the lastest version of moses.ini. Thank you all the same, @Alexandru ! – JavaNoScript May 04 '14 at 09:47
0

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

Ali J
  • 332
  • 1
  • 5
  • 8