mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
Meteor compatibility with batch MIRA
This commit is contained in:
parent
0a8e5fb3bf
commit
0714521367
@ -23,10 +23,10 @@ class ScoreStats;
|
|||||||
* Meteor scoring
|
* Meteor scoring
|
||||||
*
|
*
|
||||||
* https://github.com/mjdenkowski/meteor
|
* https://github.com/mjdenkowski/meteor
|
||||||
* http://statmt.org/wmt11/pdf/WMT07.pdf
|
* http://statmt.org/wmt14/pdf/W14-3348.pdf
|
||||||
*
|
*
|
||||||
* Config:
|
* 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)
|
* lang - optional language code (default: en)
|
||||||
* task - optional task (default: tune)
|
* task - optional task (default: tune)
|
||||||
* m - optional quoted, space delimited module string "exact stem synonym paraphrase" (default varies by language)
|
* 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")
|
* 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:
|
* 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
|
class MeteorScorer: public StatisticsBasedScorer
|
||||||
{
|
{
|
||||||
@ -54,6 +57,11 @@ public:
|
|||||||
return 23;
|
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;
|
virtual float calculateScore(const std::vector<ScoreStatsType>& comps) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user