Statistical Machine Translation - Decoding with Moses
We will build a state of the art phrase-based SMT system, tune it with minimum error rate training (MERT, described in lecture 4) and run a test set to see the BLEU score.
We will replicate the shared task from the ACL 2008 Third Workshop on Statistical Machine Translation (WMT08). However, we will use a smaller data set so that the experiment runs quickly.
We will build the baseline system from WMT08 by following the directions here.
The instructions are written for French to English, but you may also build German to English. If you wish to build German to English, you need to substitute "de" for "fr" throughout the web page.
You should build the system on your own Linux laptop or a Linux computer at the IMS. First, transfer wmt08_small.tar.gz to your machine, it contains the data you will use for your experiments. Expand the tar file in a fresh directory (it will create a subdirectory called wmt08 containing the training, dev and devtest data you will use). Then follow the WMT08 directions from the top. One change from that description is that you should use my scripts.tar.gz rather than their "scripts.tgz" file because it contains the BLEU scoring tool you will need. See also "IMPORTANT COMMENTS" below for some bug fixes in the WMT08 directions.
Other details
IMPORTANT COMMENTS:
- Substitute your scripts installation (it will be something like bin/moses-scripts/scripts-20090908-2007) for bin/moses-scripts/scripts-YYYYMMDD-HHMM.
- There is a typo in running the training script: the last token should point to your subdirectory using an absolute path. Change to "0:5:/FULL-PATH-TO-YOUR-SUBDIR/working-dir/lm/europarl.lm:0" from "0:5:working-dir/lm/europarl.lm:0". You can get the full path by using the "pwd" command.
- For running the last step, the script mteval-11b-lr.pl (not "mteval-11b.pl") is in the "scripts" subdirectory.
- If you are having trouble with the step "Run tuning script", change the rootdir argument (the last argument on the tuning script command line) from a relative path to a full path, i.e., change it from "bin/moses-scripts/scripts-YYYYMMDD-HHMM" to "/FULL-PATH-TO-YOUR-SUBDIR/bin/moses-scripts/scripts-YYYYMMDD-HHMM". You can get the full path by using the "pwd" command.
- When you reach the point where the decoder is printing hypothesized translations, this means MERT is running. This will take quite a while (particularly on slow machines). However, after that completes you are close to done!
- VERY VERY OPTIONAL: follow the steps again on all of the training data (see the link "Shared Translation Task" at the top of the web page, go to the bottom of that page to get the parallel data, monolingual data, and development (dev and devtest) data you will use. You will need several gigabytes of disk space to run this; a lot of temporary files get created). This will take a couple of days of computation. When it completes you have a very good system that is not that far from the state of the art for news translation (and quite close to the state of the art for translating European Parliament proceedings). WARNING: you will need a machine with 2 GB RAM, if you do not have enough RAM your machine will start to swap and never finish!