summaryrefslogtreecommitdiff
path: root/mteval
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-05-13 03:35:30 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-05-13 03:35:30 +0200
commit670a8f984fc6d8342180c59ae9e96b0b76f34d3d (patch)
tree9f2ce7eec1a77e56b3bb1ad0ad40f212d7a996b0 /mteval
parenteb3ee28dc0eb1d3e5ed01ba0df843be329ae450d (diff)
parent2f64af3e06a518b93f7ca2c30a9d0aeb2c947031 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mteval')
-rw-r--r--mteval/Jamfile8
-rw-r--r--mteval/scorer_test.cc9
2 files changed, 13 insertions, 4 deletions
diff --git a/mteval/Jamfile b/mteval/Jamfile
new file mode 100644
index 00000000..24a95e8f
--- /dev/null
+++ b/mteval/Jamfile
@@ -0,0 +1,8 @@
+import testing ;
+
+lib mteval : ter.cc comb_scorer.cc aer_scorer.cc scorer.cc external_scorer.cc ns.cc ns_ter.cc ns_ext.cc ns_comb.cc ns_docscorer.cc ..//utils : <include>. : : <include>. ;
+exe fast_score : fast_score.cc mteval ..//utils ..//boost_program_options ;
+exe mbr_kbest : mbr_kbest.cc mteval ..//utils ..//boost_program_options ;
+alias programs : fast_score mbr_kbest ;
+
+unit-test scorer_test : scorer_test.cc mteval ..//utils ..//z ..//boost_unit_test_framework : <testing.arg>$(TOP)/mteval/test_data ;
diff --git a/mteval/scorer_test.cc b/mteval/scorer_test.cc
index 0e400a3a..9b765d0f 100644
--- a/mteval/scorer_test.cc
+++ b/mteval/scorer_test.cc
@@ -36,11 +36,12 @@ struct Stuff {
BOOST_FIXTURE_TEST_SUITE( s, Stuff );
BOOST_AUTO_TEST_CASE(TestCreateFromFiles) {
+ std::string path(boost::unit_test::framework::master_test_suite().argc == 2 ? boost::unit_test::framework::master_test_suite().argv[1] : "test_data");
vector<string> files;
- files.push_back("test_data/re.txt.0");
- files.push_back("test_data/re.txt.1");
- files.push_back("test_data/re.txt.2");
- files.push_back("test_data/re.txt.3");
+ files.push_back(path + "/re.txt.0");
+ files.push_back(path + "/re.txt.1");
+ files.push_back(path + "/re.txt.2");
+ files.push_back(path + "/re.txt.3");
DocScorer ds(IBM_BLEU, files);
}