From 9b83a2e82aba73b5ff0e848182a8726481a10485 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Sun, 9 Feb 2014 20:50:41 -0500 Subject: adaptive hope-fear learner --- mteval/scorer_test.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mteval/scorer_test.cc') 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 #include +#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() -- cgit v1.2.3