Moses Lab
Moses and the Experiment Management System
Aim
The idea of this lab is to introduce you to Moses, and allow you to experiment with pre-built models, as well as building your own toy models with Moses' experiment management system.
Installed Tools etc.
All the tools, data and models can be found in /group/project/statmt9/mtm12
. The Moses binaries are to be found in /group/project/statmt9/mtm12/moses/bin
Using Moses
Runining Moses with toy models
See this tutorial
Running Moses with more realistic models
These are in /group/project/statmt9/mtm12/models
. You run Moses as follows:
echo "input text" | /group/project/statmt9/mtm12/moses/bin/moses -f <path-to-ini>
Try varying the following parameters to see what happens
- verbosity: try
-v N
, with N set to 1,2 or 3. - stack size:
-s STACKSIZE
- the default is 200. - nbest list: e.g.
-n-best-list nbest.out 100
Run /group/project/statmt9/mtm12/moses/bin/moses -h
for a list of options.
Note that these models are being loaded over nfs, so will be quite slow especially for the first sentence. You can copy them to /disk/scratch
to speed things up, but they are big!
Using EMS
Use the following commands to set up an experiment:
cd mkdir experiment cd experiment cp /group/project/statmt9/mtm12/moses/scripts/ems/example/config.toy .
Now in config.toy
edit the following settings:
working-dir = /home/<USERID>/experiment moses-src-dir = /group/project/statmt9/mtm12/moses moses-script-dir = $moses-src-dir/scripts irstlm-dir = /group/project/statmt9/mtm12/irstlm-5.80.01/bin external-bin-dir = $moses-src-dir/bin nist-bleu = $moses-script-dir/generic/mteval-v12.pl nist-bleu-c = "$moses-script-dir/generic/mteval-v12.pl -c"
Comment out the randlm-dir
and srilm-dir
variables.
In the [LM]
section, comment out these two lines:
lm-training = $srilm-dir/ngram-count settings = "-interpolate -kndiscount -unk"
and uncomment these two:
#lm-training = "$moses-script-dir/generic/trainlm-irst.perl -cores $cores -irst-dir $irstlm-dir -temp-dir $working-dir/lm" #settings = ""
You are now able to run the experiment:
/group/project/statmt9/mtm12/moses/scripts/ems/experiment.perl -config config.toy -exec
See the Moses documentation for EMS for more details.