summaryrefslogtreecommitdiff
path: root/mteval/scorer_test.cc
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-02-16 00:13:17 +0100
committerPatrick Simianer <p@simianer.de>2014-02-16 00:13:17 +0100
commitab71c44e61d00c788e84b44156d0be16191e267d (patch)
tree27d1c7e74e8b07276312766a5908853465a3ed18 /mteval/scorer_test.cc
parent4494c2cae3bed81f9d2d24d749e99bf66a734bc5 (diff)
parent9e2f7fcfa76213f5e41abb4f4c9a264ebe8f9d8c (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mteval/scorer_test.cc')
-rw-r--r--mteval/scorer_test.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/mteval/scorer_test.cc b/mteval/scorer_test.cc
index da07f154..cd27f020 100644
--- a/mteval/scorer_test.cc
+++ b/mteval/scorer_test.cc
@@ -3,6 +3,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
+#include "ns_docscorer.h"
#include "ns.h"
#include "tdict.h"
#include "scorer.h"
@@ -223,4 +224,12 @@ BOOST_AUTO_TEST_CASE(NewScoreAPI) {
//cerr << metric->ComputeScore(statse) << endl;
}
+BOOST_AUTO_TEST_CASE(HybridSourceReferenceFileFormat) {
+ std::string path(boost::unit_test::framework::master_test_suite().argc == 2 ? boost::unit_test::framework::master_test_suite().argv[1] : TEST_DATA);
+ EvaluationMetric* metric = EvaluationMetric::Instance("IBM_BLEU");
+ DocumentScorer ds(metric, path + "/devset.txt");
+ BOOST_CHECK_EQUAL(2, ds.size());
+ BOOST_CHECK_EQUAL("Quelltext hier .", ds[0]->src);
+}
+
BOOST_AUTO_TEST_SUITE_END()