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:
authormjdenkowski <michael.j.denkowski@gmail.com>2015-03-14 00:41:53 +0300
committermjdenkowski <michael.j.denkowski@gmail.com>2015-03-14 00:41:53 +0300
commit07145213674938ca13a19c462dac692b715b3ba3 (patch)
tree6583e482ad16c4230f147f40c8c518510215beff /mert/MeteorScorer.h
parent0a8e5fb3bf51a2a8fc6c0704b80ce7217baf333d (diff)
Meteor compatibility with batch MIRA
Diffstat (limited to 'mert/MeteorScorer.h')
-rw-r--r--mert/MeteorScorer.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/mert/MeteorScorer.h b/mert/MeteorScorer.h
index 31b05ec72..adae68b54 100644
--- a/mert/MeteorScorer.h
+++ b/mert/MeteorScorer.h
@@ -23,10 +23,10 @@ class ScoreStats;
* Meteor scoring
*
* https://github.com/mjdenkowski/meteor
- * http://statmt.org/wmt11/pdf/WMT07.pdf
+ * http://statmt.org/wmt14/pdf/W14-3348.pdf
*
* Config:
- * jar - location of meteor-*.jar (meteor-1.4.jar at time of writing)
+ * jar - location of meteor-*.jar (meteor-1.5.jar at time of writing)
* lang - optional language code (default: en)
* task - optional task (default: tune)
* m - optional quoted, space delimited module string "exact stem synonym paraphrase" (default varies by language)
@@ -34,7 +34,10 @@ class ScoreStats;
* w - optional quoted, space delimited weight string "w_exact w_stem w_synonym w_paraphrase" (default for tune: "1.0 0.5 0.5 0.5")
*
* Usage with mert-moses.pl:
- * --mertargs="--sctype METEOR --scconfig jar:/path/to/meteor-1.4.jar"
+ * --mertargs="--sctype METEOR --scconfig jar:/path/to/meteor-1.5.jar"
+ *
+ * Usage with mert-moses.pl when using --batch-mira:
+ * --batch-mira-args="--sctype METEOR --scconfig jar:/path/to/meteor-1.5.jar"
*/
class MeteorScorer: public StatisticsBasedScorer
{
@@ -54,6 +57,11 @@ public:
return 23;
}
+ virtual float getReferenceLength(const std::vector<ScoreStatsType>& totals) const {
+ // refLen is index 1 (see above stats comment)
+ return totals[1];
+ }
+
virtual float calculateScore(const std::vector<ScoreStatsType>& comps) const;
private: