diff options
author | Marcin Junczys-Dowmunt <junczys@amu.edu.pl> | 2017-03-28 17:06:54 +0300 |
---|---|---|
committer | Marcin Junczys-Dowmunt <junczys@amu.edu.pl> | 2017-03-28 17:06:54 +0300 |
commit | aebe5c487876b5f4538f47fdc83d707417ca10eb (patch) | |
tree | 36b059bd9a3c851589470c13efe67d63b8e3e57f /examples/training | |
parent | 6402be02f594d39d9a790af8230550dab3172256 (diff) |
use moses-scripts repo
Diffstat (limited to 'examples/training')
-rwxr-xr-x | examples/training/clean.sh | 2 | ||||
-rwxr-xr-x | examples/training/run-me.sh | 12 | ||||
-rwxr-xr-x | examples/training/scripts/preprocess.sh | 2 | ||||
-rwxr-xr-x | examples/training/scripts/validate.sh | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/examples/training/clean.sh b/examples/training/clean.sh index a5a4e659..bbf92017 100755 --- a/examples/training/clean.sh +++ b/examples/training/clean.sh @@ -1,4 +1,4 @@ #!/bin/bash -v git clean -f -rm -rf mosesdecoder subword-nmt model
\ No newline at end of file +rm -rf moses-scripts subword-nmt model
\ No newline at end of file diff --git a/examples/training/run-me.sh b/examples/training/run-me.sh index 483f088a..605ad302 100755 --- a/examples/training/run-me.sh +++ b/examples/training/run-me.sh @@ -21,9 +21,9 @@ then fi # download depdencies and data -if [ ! -e "mosesdecoder" ] +if [ ! -e "moses-scripts" ] then - git clone https://github.com/moses-smt/mosesdecoder + git clone https://github.com/amunmt/moses-scripts fi if [ ! -e "subword-nmt" ] @@ -74,13 +74,13 @@ MODELS=`cat model/valid.log | grep valid-script | sort -rg -k8,8 -t ' ' | cut -f # translate dev set with averaged model cat data/newsdev2016.bpe.ro \ | ../../build/amun -c model/model.npz.amun.yml -m model/model.avg.npz -d $GPUS -b 12 -n --mini-batch 10 --maxi-batch 1000 \ - | sed 's/\@\@ //g' | mosesdecoder/scripts/recaser/detruecase.perl > data/newsdev2016.bpe.ro.output.postprocessed + | sed 's/\@\@ //g' | moses-scripts/scripts/recaser/detruecase.perl > data/newsdev2016.bpe.ro.output.postprocessed # translate test set with averaged model cat data/newstest2016.bpe.ro \ | ../../build/amun -c model/model.npz.amun.yml -m model/model.avg.npz -d $GPUS -b 12 -n --mini-batch 10 --maxi-batch 1000 \ - | sed 's/\@\@ //g' | mosesdecoder/scripts/recaser/detruecase.perl > data/newstest2016.bpe.ro.output.postprocessed + | sed 's/\@\@ //g' | moses-scripts/scripts/recaser/detruecase.perl > data/newstest2016.bpe.ro.output.postprocessed # calculate bleu scores for dev and test set -./mosesdecoder/scripts/generic/multi-bleu.perl data/newsdev2016.tok.en < data/newsdev2016.bpe.ro.output.postprocessed -./mosesdecoder/scripts/generic/multi-bleu.perl data/newstest2016.tok.en < data/newstest2016.bpe.ro.output.postprocessed +./moses-scripts/scripts/generic/multi-bleu.perl data/newsdev2016.tok.en < data/newsdev2016.bpe.ro.output.postprocessed +./moses-scripts/scripts/generic/multi-bleu.perl data/newstest2016.tok.en < data/newstest2016.bpe.ro.output.postprocessed diff --git a/examples/training/scripts/preprocess.sh b/examples/training/scripts/preprocess.sh index cd0a6b0f..87148505 100755 --- a/examples/training/scripts/preprocess.sh +++ b/examples/training/scripts/preprocess.sh @@ -22,7 +22,7 @@ TRG=en bpe_operations=85000 # path to moses decoder: https://github.com/moses-smt/mosesdecoder -mosesdecoder=mosesdecoder +mosesdecoder=moses-scripts # path to subword segmentation scripts: https://github.com/rsennrich/subword-nmt subword_nmt=subword-nmt diff --git a/examples/training/scripts/validate.sh b/examples/training/scripts/validate.sh index a61c5310..16a19bc8 100755 --- a/examples/training/scripts/validate.sh +++ b/examples/training/scripts/validate.sh @@ -9,8 +9,8 @@ ref=data/newsdev2016.tok.en # decode cat $dev | ../../build/amun -c $prefix.dev.npz.amun.yml -b 12 -n --mini-batch 10 --maxi-batch 100 2>/dev/null \ - | sed 's/\@\@ //g' | ./mosesdecoder/scripts/recaser/detruecase.perl > $dev.output.postprocessed + | sed 's/\@\@ //g' | ./moses-scripts/scripts/recaser/detruecase.perl > $dev.output.postprocessed ## get BLEU -./mosesdecoder/scripts/generic/multi-bleu.perl $ref < $dev.output.postprocessed | cut -f 3 -d ' ' | cut -f 1 -d ',' +./moses-scripts/scripts/generic/multi-bleu.perl $ref < $dev.output.postprocessed | cut -f 3 -d ' ' | cut -f 1 -d ',' |