diff options
author | Matthias Huck <huck@i6.informatik.rwth-aachen.de> | 2015-04-23 20:13:02 +0300 |
---|---|---|
committer | Matthias Huck <huck@i6.informatik.rwth-aachen.de> | 2015-04-23 20:13:02 +0300 |
commit | f24f31f965abd3b3e02b48f7aaaf17a8003a4b8f (patch) | |
tree | 469a534918c66b69083d4803f87eee46f3621d31 /moses/mbr.cpp | |
parent | 388e180afc77409558f46f4899815163a09a8681 (diff) |
n-best list creation in phrase-based decoding: improved efficiency with sparse features
Diffstat (limited to 'moses/mbr.cpp')
-rw-r--r-- | moses/mbr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/moses/mbr.cpp b/moses/mbr.cpp index df2313b66..66dac47f7 100644 --- a/moses/mbr.cpp +++ b/moses/mbr.cpp @@ -105,13 +105,13 @@ const TrellisPath doMBR(const TrellisPathList& nBestList) for (iter = nBestList.begin() ; iter != nBestList.end() ; ++iter) { const TrellisPath &path = **iter; float score = StaticData::Instance().GetMBRScale() - * path.GetScoreBreakdown().GetWeightedScore(); + * path.GetScoreBreakdown()->GetWeightedScore(); if (maxScore < score) maxScore = score; } for (iter = nBestList.begin() ; iter != nBestList.end() ; ++iter) { const TrellisPath &path = **iter; - joint_prob = UntransformScore(StaticData::Instance().GetMBRScale() * path.GetScoreBreakdown().GetWeightedScore() - maxScore); + joint_prob = UntransformScore(StaticData::Instance().GetMBRScale() * path.GetScoreBreakdown()->GetWeightedScore() - maxScore); marginal += joint_prob; joint_prob_vec.push_back(joint_prob); |