Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Haddow <barry.haddow@gmail.com>2013-02-18 15:11:20 +0400
committerBarry Haddow <barry.haddow@gmail.com>2013-02-18 15:11:20 +0400
commit9ca364fb22d7efbfb1880744c8ea3b74e9b8787b (patch)
tree66d805658f4dbff1f4eee296768b23cc299676f6 /mert/BleuScorer.h
parent2e6b5e7a23f41835d55f405213ffcc665ad3e539 (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.h4
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.