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:
authorRico Sennrich <rico.sennrich@gmx.ch>2014-09-17 17:14:11 +0400
committerRico Sennrich <rico.sennrich@gmx.ch>2014-09-22 13:49:20 +0400
commit3d00e5dc8ceb19d619e2ed2d0aa3f1b2a160944a (patch)
tree9d6a6fc32490d47aa0291c52285f53bf8d5abfac /mert/BleuScorer.h
parent6810b225ccd673c7684ab9b62e0daa0a7af054f3 (diff)
basic support for more metrics with kbmira
metrics need getReferenceLength (for background smoothing) to work with kbmira
Diffstat (limited to 'mert/BleuScorer.h')
-rw-r--r--mert/BleuScorer.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/mert/BleuScorer.h b/mert/BleuScorer.h
index 5fdce4a94..0594c8dca 100644
--- a/mert/BleuScorer.h
+++ b/mert/BleuScorer.h
@@ -55,6 +55,10 @@ public:
return m_references.get();
}
+ virtual float getReferenceLength(const std::vector<ScoreStatsType>& totals) const {
+ return totals[kBleuNgramOrder*2];
+ }
+
/**
* Count the ngrams of each type, up to the given length in the input line.
*/
@@ -93,11 +97,6 @@ float smoothedSentenceBleu
*/
float sentenceLevelBackgroundBleu(const std::vector<float>& sent, const std::vector<float>& bg);
-/**
- * Computes plain old BLEU from a vector of stats
- */
-float unsmoothedBleu(const std::vector<float>& stats);
-
}
#endif // MERT_BLEU_SCORER_H_