summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-02-03 20:55:10 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2012-02-03 20:55:10 -0500
commit39dc17229f574f53ddbbc6d7515712e39514b059 (patch)
tree4a6c994912f003116ae52cebf871a887603ade48
parentf08ff03664ee7c9601c9daaa217cb032160f386f (diff)
use interface properly
-rw-r--r--dpmert/mr_dpmert_reduce.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/dpmert/mr_dpmert_reduce.cc b/dpmert/mr_dpmert_reduce.cc
index dda61f88..31512a03 100644
--- a/dpmert/mr_dpmert_reduce.cc
+++ b/dpmert/mr_dpmert_reduce.cc
@@ -34,10 +34,10 @@ int main(int argc, char** argv) {
po::variables_map conf;
InitCommandLine(argc, argv, &conf);
const string evaluation_metric = conf["evaluation_metric"].as<string>();
+ EvaluationMetric* metric = EvaluationMetric::Instance(evaluation_metric);
LineOptimizer::ScoreType opt_type = LineOptimizer::MAXIMIZE_SCORE;
- if (UppercaseString(evaluation_metric) == "TER")
+ if (metric->IsErrorMetric())
opt_type = LineOptimizer::MINIMIZE_SCORE;
- EvaluationMetric* metric = EvaluationMetric::Instance(evaluation_metric);
vector<ErrorSurface> esv;
string last_key, line, key, val;