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

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbhaddow <bhaddow@1f5c12ca-751b-0410-a591-d2e778427230>2011-09-05 20:23:46 +0400
committerbhaddow <bhaddow@1f5c12ca-751b-0410-a591-d2e778427230>2011-09-05 20:23:46 +0400
commit1786d33e0f530b383064e4839a085966fcdac8f6 (patch)
treea968bed88c2368ef353f2fb4c61bd8802023d252 /mert/ScorerFactory.h
parent633b80f515ddb585b478af27ef09531d78c9a45b (diff)
Make ter scoring optional
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4172 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'mert/ScorerFactory.h')
-rw-r--r--mert/ScorerFactory.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/mert/ScorerFactory.h b/mert/ScorerFactory.h
index 1fa936ba5..9d2ddd1d9 100644
--- a/mert/ScorerFactory.h
+++ b/mert/ScorerFactory.h
@@ -27,7 +27,9 @@ public:
vector<string> types;
types.push_back(string("BLEU"));
types.push_back(string("PER"));
+#ifdef WITH_TER
types.push_back(string("TER"));
+#endif
types.push_back(string("CDER"));
return types;
}
@@ -37,9 +39,13 @@ public:
return (BleuScorer*) new BleuScorer(config);
} else if (type == "PER") {
return (PerScorer*) new PerScorer(config);
- } else if (type == "TER") {
+ }
+#ifdef WITH_TER
+ else if (type == "TER") {
return (TerScorer*) new TerScorer(config);
- } else if (type == "CDER") {
+ }
+#endif
+ else if (type == "CDER") {
return (CderScorer*) new CderScorer(config);
} else {
throw runtime_error("Unknown scorer type: " + type);