amake / moses-smt

Dock You a Moses: Moses Statistical MT in a container
MIT License
12 stars 4 forks source link
docker-image moses repl tmx

Dock You a Moses

Want to play with the Moses Statistical Machine Translation system, but...

Well now you don't have to, because I stuffed Moses in a Docker container for you.

What is this?

Requirements

Usage

First, if trying to build the base image, you might need to re-balance the number of cores vs memory available to Docker: e.g. 8 cores but only 2 GB of memory results in compilation failures. 4 cores with 4 GB seems to work better.

  1. Put most of your TMXs in tmx-train, and the rest in tmx-tune.

  2. Run make SOURCE_LANG=<src> TARGET_LANG=<trg> [LABEL=<lbl>].

    • src and trg (required) are the language codes (not language + country) for your source and target languages, e.g. en and fr.

    • lbl is an optional label for the resulting image; myinstance by default.

  3. Wait forever.

  4. When done, you will have a Docker image tagged moses-smt:<lbl>-<src>-<trg>.

    • Run make server SOURCE_LANG=<src> TARGET_LANG=<trg> [PORT=<port>] to start mosesserver which you can query over XML-RPC.

    • Optionally specify a port; the default is 8080.

What then?