diff options
author | Barry Haddow <barry.haddow@gmail.com> | 2013-02-18 15:11:20 +0400 |
---|---|---|
committer | Barry Haddow <barry.haddow@gmail.com> | 2013-02-18 15:11:20 +0400 |
commit | 9ca364fb22d7efbfb1880744c8ea3b74e9b8787b (patch) | |
tree | 66d805658f4dbff1f4eee296768b23cc299676f6 /mert/BleuScorer.h | |
parent | 2e6b5e7a23f41835d55f405213ffcc665ad3e539 (diff) |
Implement brevity penalty smoothing for PRO
As in Nakov et al (Coling 2012)
Diffstat (limited to 'mert/BleuScorer.h')
-rw-r--r-- | mert/BleuScorer.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mert/BleuScorer.h b/mert/BleuScorer.h index 6b8b8d046..af889b13e 100644 --- a/mert/BleuScorer.h +++ b/mert/BleuScorer.h @@ -34,7 +34,6 @@ public: ~BleuScorer(); static std::vector<float> ScoreNbestList(const std::string& scoreFile, const std::string& featureFile); - static float sentenceLevelBleuPlusOne(const std::vector<float>& stats); virtual void setReferenceFiles(const std::vector<std::string>& referenceFiles); virtual void prepareStats(std::size_t sid, const std::string& text, ScoreStats& entry); @@ -74,7 +73,8 @@ private: /** Computes sentence-level BLEU+1 score. * This function is used in PRO. */ -float sentenceLevelBleuPlusOne(const std::vector<float>& stats); +float smoothedSentenceBleu + (const std::vector<float>& stats, float smoothing=1.0, bool smoothBP=false); /** Computes sentence-level BLEU score given a background corpus. * This function is used in batch MIRA. |