MosesTuning::M2Scorer Class Reference

#include <M2Scorer.h>

Inheritance diagram for MosesTuning::M2Scorer:

Inheritance graph
[legend]
Collaboration diagram for MosesTuning::M2Scorer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 M2Scorer (const std::string &config)
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 calculateScore (const std::vector< ScoreStatsType > &comps) const
virtual float getReferenceLength (const std::vector< ScoreStatsType > &comps) const


Detailed Description

M2Scorer class can compute CoNLL m2 F-score.

Definition at line 19 of file M2Scorer.h.


Constructor & Destructor Documentation

MosesTuning::M2Scorer::M2Scorer ( const std::string &  config  )  [explicit]


Member Function Documentation

virtual float MosesTuning::M2Scorer::calculateScore ( const std::vector< ScoreStatsType > &  totals  )  const [virtual]

Calculate the actual score.

Implements MosesTuning::StatisticsBasedScorer.

virtual float MosesTuning::M2Scorer::getReferenceLength ( const std::vector< ScoreStatsType > &  totals  )  const [virtual]

Based on vector of sufficient statistics, return length of reference.

Reimplemented from MosesTuning::StatisticsBasedScorer.

virtual std::size_t MosesTuning::M2Scorer::NumberOfScores (  )  const [inline, virtual]

Return the number of statistics needed for the computation of the score.

Implements MosesTuning::Scorer.

Definition at line 27 of file M2Scorer.h.

virtual void MosesTuning::M2Scorer::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::M2Scorer::setReferenceFiles ( const std::vector< std::string > &  referenceFiles  )  [virtual]

Set the reference files. This must be called before prepareStats().

Reimplemented from MosesTuning::Scorer.


The documentation for this class was generated from the following file:

Generated on Thu Jul 6 00:34:17 2017 for Moses by  doxygen 1.5.9