Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Junczys-Dowmunt <junczys@amu.edu.pl>2017-03-24 20:37:35 +0300
committerMarcin Junczys-Dowmunt <junczys@amu.edu.pl>2017-03-24 20:37:35 +0300
commit5dbeadb47dbb70b85061aa08c8c55193d9fbe74a (patch)
tree2e0e7d1698b0c756896c6af59cde4eb4f5eabd02 /examples/training/scripts/validate.sh
parente7157515d3f30b44649f2f48b4a70b3999530a02 (diff)
added training example
Diffstat (limited to 'examples/training/scripts/validate.sh')
-rwxr-xr-xexamples/training/scripts/validate.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/training/scripts/validate.sh b/examples/training/scripts/validate.sh
new file mode 100755
index 00000000..992689de
--- /dev/null
+++ b/examples/training/scripts/validate.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+#model prefix
+prefix=model/model.npz
+
+dev=data/newsdev2016.bpe.ro
+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.dev
+
+## get BLEU
+BLEU=`./mosesdecoder/scripts/generic/multi-bleu.perl $ref < $dev.output.postprocessed.dev | cut -f 3 -d ' ' | cut -f 1 -d ','`
+
+echo $BLEU