diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-04-22 15:11:05 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-04-22 15:11:05 +0400 |
commit | 91a67250816ed3e297504313f76e17371f642f9e (patch) | |
tree | a2d3f91c9e7b2cc16a723cc4b8eab1a00eb507a4 /mert/BleuScorerTest.cpp | |
parent | fe79b96328c3aadf034529427b21d98be03aab77 (diff) |
Add a test case for setting up BLEU's reference length.
To make sure the type of effective reference length is
set to the specified arguments.
Diffstat (limited to 'mert/BleuScorerTest.cpp')
-rw-r--r-- | mert/BleuScorerTest.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mert/BleuScorerTest.cpp b/mert/BleuScorerTest.cpp index 6b01da0ce..5da4cfc6c 100644 --- a/mert/BleuScorerTest.cpp +++ b/mert/BleuScorerTest.cpp @@ -125,6 +125,18 @@ BOOST_AUTO_TEST_CASE(bleu_reference_type) { BOOST_CHECK_EQUAL(scorer.GetReferenceLengthType(), BleuScorer::SHORTEST); } +BOOST_AUTO_TEST_CASE(bleu_reference_type_with_config) { + { + BleuScorer scorer("reflen:average"); + BOOST_CHECK_EQUAL(scorer.GetReferenceLengthType(), BleuScorer::AVERAGE); + } + + { + BleuScorer scorer("reflen:shortest"); + BOOST_CHECK_EQUAL(scorer.GetReferenceLengthType(), BleuScorer::SHORTEST); + } +} + BOOST_AUTO_TEST_CASE(bleu_count_ngrams) { BleuScorer scorer; |