Skip to content

hominsu/moses-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues License Deploy


moses-docker

This project prepares a minimalist Docker image with mosesdecoder.

Examples · Building · License

Examples

All the scripts and binaries are placed in /moses/script/ and /moses/bin/.

mkdir -p workspace
docker pull hominsu/moses:latest
docker run -v ./workspace:/workspace -it --rm hominsu/moses:latest /bin/bash

For examples.

  • Use multi-bleu.perl to evaluate bleu.

    /moses/scripts/generic/multi-bleu.perl -lc ../corpus/tst.clean.en < tst.translated.en
  • Use moses to translate the test set.

    /moses/bin/moses -f ./filtered-corpus/moses.ini < ../corpus/tst.clean.zh > tst.translated.en 2> tst.out

Notice!!!

Use Multi-threaded GIZA++ as the word alignment tool here, so while you are training, you need to specify the word alignment tool as MGIZA.

/moses/scripts/training/train-model.perl -root-dir train -corpus ../corpus/train.clean -f zh -e en -alignment grow-diag-final-and -reordering msd-bidirectional-fe -lm 0:3:$(pwd)/../lm/train.blm.en:8 -mgiza -mgiza-cpus 64 -cores 64 -external-bin-dir /usr/local/bin >& training.out

Building

This project requires Docker.

With the platform option, build any platform you want.

docker buildx bake --file ./docker-bake.hcl --load --set "*.platform=linux/amd64"

License

Distributed under the MIT license. See LICENSE for more information.