diff options
author | Barry Haddow <barry.haddow@gmail.com> | 2014-07-21 14:04:43 +0400 |
---|---|---|
committer | Barry Haddow <barry.haddow@gmail.com> | 2014-07-21 14:04:43 +0400 |
commit | efee2695c31e1086af783c1b092fc842fb7bb1a4 (patch) | |
tree | e8324ea35cc92f0737c93f6b8fa8e23898e4d78a /mert/BleuScorer.cpp | |
parent | c83c5a3ee6f3ef7480e7a782d2023af9e99c1711 (diff) |
Merge 08811deb17337356cd8dae9c59c0160590679a35 from joshua
Diffstat (limited to 'mert/BleuScorer.cpp')
-rw-r--r-- | mert/BleuScorer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mert/BleuScorer.cpp b/mert/BleuScorer.cpp index 467855d9b..f6ada2aa8 100644 --- a/mert/BleuScorer.cpp +++ b/mert/BleuScorer.cpp @@ -266,12 +266,12 @@ float smoothedSentenceBleu float sentenceLevelBackgroundBleu(const std::vector<float>& sent, const std::vector<float>& bg) { // Sum sent and background - std::vector<float> stats; UTIL_THROW_IF(sent.size()!=bg.size(), util::Exception, "Error"); UTIL_THROW_IF(sent.size() != kBleuNgramOrder * 2 + 1, util::Exception, "Error"); + std::vector<float> stats(sent.size()); for(size_t i=0; i<sent.size(); i++) - stats.push_back(sent[i]+bg[i]); + stats[i] = sent[i]+bg[i]; // Calculate BLEU float logbleu = 0.0; |