diff options
author | Patrick Simianer <p@simianer.de> | 2011-10-20 02:31:25 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2011-10-20 02:31:25 +0200 |
commit | 92e48b652530d2d2bb4f2694501f95a60d727cb2 (patch) | |
tree | b484bd0c4216525690de8b14fb654c9581a300c2 /mteval/mbr_kbest.cc | |
parent | 0e70073cec6cdcafaf60d4fbcbd1adf82ae21c8e (diff) | |
parent | 082b6c77e0703ccd1c85947828c33d4b0eef20f0 (diff) |
finalized merge
Diffstat (limited to 'mteval/mbr_kbest.cc')
-rw-r--r-- | mteval/mbr_kbest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mteval/mbr_kbest.cc b/mteval/mbr_kbest.cc index 2867b36b..64a6a8bf 100644 --- a/mteval/mbr_kbest.cc +++ b/mteval/mbr_kbest.cc @@ -32,7 +32,7 @@ void InitCommandLine(int argc, char** argv, po::variables_map* conf) { } struct LossComparer { - bool operator()(const pair<vector<WordID>, double>& a, const pair<vector<WordID>, double>& b) const { + bool operator()(const pair<vector<WordID>, prob_t>& a, const pair<vector<WordID>, prob_t>& b) const { return a.second < b.second; } }; @@ -108,7 +108,7 @@ int main(int argc, char** argv) { ScoreP s = scorer->ScoreCandidate(list[j].first); double loss = 1.0 - s->ComputeScore(); if (type == TER || type == AER) loss = 1.0 - loss; - double weighted_loss = loss * (joints[j] / marginal); + double weighted_loss = loss * (joints[j] / marginal).as_float(); wl_acc += weighted_loss; if ((!output_list) && wl_acc > mbr_loss) break; } |