From 9ca364fb22d7efbfb1880744c8ea3b74e9b8787b Mon Sep 17 00:00:00 2001 From: Barry Haddow Date: Mon, 18 Feb 2013 11:11:20 +0000 Subject: Implement brevity penalty smoothing for PRO As in Nakov et al (Coling 2012) --- mert/BleuScorer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mert/BleuScorer.h') 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 ScoreNbestList(const std::string& scoreFile, const std::string& featureFile); - static float sentenceLevelBleuPlusOne(const std::vector& stats); virtual void setReferenceFiles(const std::vector& 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& stats); +float smoothedSentenceBleu + (const std::vector& stats, float smoothing=1.0, bool smoothBP=false); /** Computes sentence-level BLEU score given a background corpus. * This function is used in batch MIRA. -- cgit v1.2.3