diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2012-04-27 00:24:21 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2012-04-27 00:24:21 -0400 |
commit | c5f69888943623e80478b6ba9247acc85758bedf (patch) | |
tree | 6a4fbec5e08c7188a79494dbd52a81bb7fea3485 /rampion/rampion_cccp.cc | |
parent | 230cf27272cc7c15ebf7370b9aa8808b5b282426 (diff) |
make rampion match pseudocode exactly
Diffstat (limited to 'rampion/rampion_cccp.cc')
-rw-r--r-- | rampion/rampion_cccp.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rampion/rampion_cccp.cc b/rampion/rampion_cccp.cc index a04da831..7a6f1f0c 100644 --- a/rampion/rampion_cccp.cc +++ b/rampion/rampion_cccp.cc @@ -58,7 +58,7 @@ struct HypInfo { SufficientStats ss; scorer.Evaluate(hyp, &ss); g = metric->ComputeScore(ss); - if (metric->IsErrorMetric()) g = 1 - g; + if (!metric->IsErrorMetric()) g = 1 - g; } vector<WordID> hyp; @@ -91,7 +91,7 @@ int main(int argc, char** argv) { EvaluationMetric* metric = EvaluationMetric::Instance(evaluation_metric); DocumentScorer ds(metric, conf["reference"].as<vector<string> >()); cerr << "Loaded " << ds.size() << " references for scoring with " << evaluation_metric << endl; - double goodsign = 1; + double goodsign = -1; double badsign = -goodsign; Hypergraph hg; |