diff options
author | bhaddow <bhaddow@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-09-05 20:23:46 +0400 |
---|---|---|
committer | bhaddow <bhaddow@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-09-05 20:23:46 +0400 |
commit | 1786d33e0f530b383064e4839a085966fcdac8f6 (patch) | |
tree | a968bed88c2368ef353f2fb4c61bd8802023d252 /mert/ScorerFactory.h | |
parent | 633b80f515ddb585b478af27ef09531d78c9a45b (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.h | 10 |
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); |