Meteor compatibility with batch MIRA

This commit is contained in:
mjdenkowski 2015-03-13 17:41:53 -04:00
parent 0a8e5fb3bf
commit 0714521367

View File

@ -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: