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

github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2019-01-04 16:06:22 +0300
committerRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2019-01-04 16:06:22 +0300
commit62b77252df75e75b63cad97a4ce23651baa8f2e0 (patch)
tree902c2dc3de74ce5d408e6cf09243e01a658a0cf1
parent35ca2e184c2e7fe8ad79cc534a6f5cbfd5ac96e8 (diff)
Add test with XML violation penalty
-rw-r--r--tests/decoder/xml/test_xml_violation_penalty.sh21
-rw-r--r--tests/decoder/xml/vp.expected30
2 files changed, 51 insertions, 0 deletions
diff --git a/tests/decoder/xml/test_xml_violation_penalty.sh b/tests/decoder/xml/test_xml_violation_penalty.sh
new file mode 100644
index 0000000..5d9506b
--- /dev/null
+++ b/tests/decoder/xml/test_xml_violation_penalty.sh
@@ -0,0 +1,21 @@
+#!/bin/bash -x
+
+#####################################################################
+# SUMMARY: Test constrained decoding with high violation penalty
+# AUTHOR: snukky
+#####################################################################
+
+# Exit on error
+set -e
+
+# Remove old artifacts
+rm -f vp.{out,diff}
+
+# Run marian decoder
+$MRT_MARIAN/marian-decoder -c $MRT_MODELS/wmt16_systems/marian.de-en.yml --mini-batch 10 -b 3 --xml-input --n-best --xml-violation-penalty 99 < text.in > vp.out
+
+# Compare the output with the expected output
+$MRT_TOOLS/diff-nums.py vp.out vp.expected -o vp.diff
+
+# Exit with success code
+exit 0
diff --git a/tests/decoder/xml/vp.expected b/tests/decoder/xml/vp.expected
new file mode 100644
index 0000000..a8f522e
--- /dev/null
+++ b/tests/decoder/xml/vp.expected
@@ -0,0 +1,30 @@
+0 ||| Obama welcomes Netanyahu Trumpf ||| F0= -18.9522 ||| 79.908
+0 ||| Obama Trumpf ||| F0= -16.7771 ||| 78.6403
+0 ||| Obama welcomes Netanyahu ||| F0= -0.72431 ||| -0.72431
+1 ||| the relationship between Obama and Netanyahu is not exactly friendly . ||| F0= -1.44457 ||| 94.6038
+1 ||| the relationship between Obama and Netanyahu is not exactly amic@@ able . ||| F0= -2.1021 ||| 93.9462
+1 ||| the relationship with Obama and Netanyahu is not exactly friendly . ||| F0= -8.51821 ||| -8.51821
+2 ||| the two wanted to talk about the implementation of the international treaty and of Tehran &apos;s destabilising measures in the Middle East . ||| F0= -11.9959 ||| 84.2468
+2 ||| the two wanted to talk about the implementation of the international treaty and of Tehran &apos;s destabilising actions in the Middle East . ||| F0= -12.4591 ||| 83.7836
+2 ||| the two wanted to talk about the implementation of the international agreement and of Tehran &apos;s destabilising measures in the Middle East . ||| F0= -6.38888 ||| -6.38888
+3 ||| in the event of the meeting , it is also about the conflict with the Palestinians and the two states discussed . ||| F0= -13.6484 ||| 81.3094
+3 ||| in the event of the meeting , it is also about the conflict with the Palestinians and the two states being discussed . ||| F0= -14.3795 ||| 80.5783
+3 ||| in the event of the meeting , it is also important to resolve the conflict with the Palestinians and the two states discussed . about the conflict . ||| F0= -34.051 ||| 56.6942
+4 ||| the relationship between Obama and Netanyahu has been stretched for years . ||| F0= -2.51302 ||| -2.51302
+4 ||| the relationship between Obama and Netanyahu has been looking forward for years . ||| F0= -3.78594 ||| -3.78594
+4 ||| the relationship between Obama and Netanyahu has been looking forward to years . ||| F0= -3.96719 ||| -3.96719
+5 ||| Washington critici@@ zes Israel &apos;s ongoing Israeli and acc@@ uses Netanyahu ! ||| F0= -24.0015 ||| 73.1676
+5 ||| Washington critici@@ zes Israel &apos;s ongoing Israeli and ! ||| F0= -23.987 ||| 72.697
+5 ||| Washington critici@@ zes Israel &apos;s ongoing Israeli and acc@@ uses Netanyahu of a ! ||| F0= -30.8404 ||| 63.6946
+6 ||| by the Obama deal to deal with Iran &apos;s nuclear program , the two continued to deteriorate . ||| F0= -12.2352 ||| -12.2352
+6 ||| by the Obama deal to deal with Iran &apos;s nuclear program , the relationship between the two continued to deteriorate . ||| F0= -13.3936 ||| -13.3936
+6 ||| by the Obama deal to deal with Iran &apos;s nuclear program , the relationship between the two has continued to deteriorate . ||| F0= -13.7331 ||| -13.7331
+7 ||| in April , Netanyahu held a controversial speech at the Congressional Republicans &apos; invitation show before the U.S. Congress . ||| F0= -22.5869 ||| 169.9
+7 ||| in April , Netanyahu held a controversial speech at the Congressional Republicans &apos; invitation . ||| F0= -14.5929 ||| 82.6241
+7 ||| in March , Netanyahu held a controversial speech at the Congressional Republicans &apos; invitation . ||| F0= -5.94075 ||| -5.94075
+8 ||| the speech was not agreed with Obama , a meeting had been rejected , with reference to the chicken that was imminent . ||| F0= -28.4084 ||| 63.6838
+8 ||| the speech was not agreed with Obama , a meeting had been rejected , with reference to the election in Israel that was chicken at the time . ||| F0= -31.1594 ||| 60.9328
+8 ||| the speech was not agreed with Obama , a meeting had been rejected , with reference to the election in Israel that was imminent . ||| F0= -14.7121 ||| -14.7121
+9 ||| in an emergency call , teacher admits to having shot his girlfriend ||| F0= -15.4446 ||| 81.7128
+9 ||| in an emergency call , teacher admits to having shot dead with his girlfriend ||| F0= -15.849 ||| 81.3084
+9 ||| in an emergency call , Professor admits to have shot dead his girlfriend ||| F0= -5.15151 ||| -5.15151