An open API service indexing awesome lists of open source software.

https://github.com/hominsu/moses-docker

Docker build for mosesdecoder
https://github.com/hominsu/moses-docker

docker docker-container docker-image dockerfile moses moses-installer moses-machine-translation mosesdecoder

Last synced: 2 months ago
JSON representation

Docker build for mosesdecoder

Awesome Lists containing this project

README

          


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/`.

```bash
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.

```bash
/moses/scripts/generic/multi-bleu.perl -lc ../corpus/tst.clean.en < tst.translated.en
```

- Use `moses` to translate the test set.

```bash
/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.

```bash
/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.

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

## License

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