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

test_nbest.sh « wmt17 « decoder « tests - github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d1c85e2f0926031acb34db3ac83305565b7e1bb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

# Exit on error
set -e

# Test code goes here
$MRT_MARIAN/build/marian-decoder -c $MRT_MODELS/wmt17_systems/marian.en-de.yml \
  -b 5 --n-best --normalize < text.in > nbest.out

# Compare n-best lists
$MRT_TOOLS/diff-floats.py -p 0.0002 nbest.out nbest.expected > nbest.diff

# Compare with nematus scores
cat nbest.out | sed -r 's/ \|\|\| /\t/g' | cut -f4 | cut -c2- > nbest.scores.out
$MRT_TOOLS/diff-floats.py -p 0.0002 nbest.scores.out nbest.scores.nematus > nbest.scores.diff

# Exit with success code
exit 0