diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2012-02-03 20:55:10 -0500 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2012-02-03 20:55:10 -0500 |
commit | f740c843d6ea88484f84152e5fb02a481192ae41 (patch) | |
tree | 7ec8d6d0c6aeafb1e185afb1d831ad71ab1e02d6 /dpmert | |
parent | 3a2fc36378337147a956e439db31baf91bfb95c8 (diff) |
use interface properly
Diffstat (limited to 'dpmert')
-rw-r--r-- | dpmert/mr_dpmert_reduce.cc | 4 |
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; |