#include <MeteorScorer.h>
Public Member Functions | |
MeteorScorer (const std::string &config="") | |
~MeteorScorer () | |
virtual void | setReferenceFiles (const std::vector< std::string > &referenceFiles) |
virtual void | prepareStats (std::size_t sid, const std::string &text, ScoreStats &entry) |
virtual std::size_t | NumberOfScores () const |
virtual float | getReferenceLength (const std::vector< ScoreStatsType > &totals) const |
virtual float | calculateScore (const std::vector< ScoreStatsType > &comps) const |
https://github.com/mjdenkowski/meteor http://statmt.org/wmt14/pdf/W14-3348.pdf
Config: 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) p - optional quoted, space delimited parameter string "alpha beta gamma delta" (default for tune: "0.5 1.0 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: --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"
Definition at line 42 of file MeteorScorer.h.
MosesTuning::MeteorScorer::MeteorScorer | ( | const std::string & | config = "" |
) | [explicit] |
MosesTuning::MeteorScorer::~MeteorScorer | ( | ) |
Definition at line 181 of file MeteorScorer.cpp.
virtual float MosesTuning::MeteorScorer::calculateScore | ( | const std::vector< ScoreStatsType > & | totals | ) | const [virtual] |
Calculate the actual score.
Implements MosesTuning::StatisticsBasedScorer.
virtual float MosesTuning::MeteorScorer::getReferenceLength | ( | const std::vector< ScoreStatsType > & | totals | ) | const [inline, virtual] |
Based on vector of sufficient statistics, return length of reference.
Reimplemented from MosesTuning::StatisticsBasedScorer.
Definition at line 60 of file MeteorScorer.h.
virtual std::size_t MosesTuning::MeteorScorer::NumberOfScores | ( | ) | const [inline, virtual] |
Return the number of statistics needed for the computation of the score.
Implements MosesTuning::Scorer.
Definition at line 51 of file MeteorScorer.h.
virtual void MosesTuning::MeteorScorer::prepareStats | ( | std::size_t | sindex, | |
const std::string & | text, | |||
ScoreStats & | entry | |||
) | [virtual] |
Process the given guessed text, corresponding to the given reference sindex and add the appropriate statistics to the entry.
Reimplemented from MosesTuning::Scorer.
virtual void MosesTuning::MeteorScorer::setReferenceFiles | ( | const std::vector< std::string > & | referenceFiles | ) | [virtual] |
Set the reference files. This must be called before prepareStats().
Reimplemented from MosesTuning::Scorer.