InterpolatedScorer Class Reference

#include <InterpolatedScorer.h>

Inheritance diagram for InterpolatedScorer:

Inheritance graph
[legend]
Collaboration diagram for InterpolatedScorer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 InterpolatedScorer (const std::string &name, const std::string &config)
virtual ~InterpolatedScorer ()
virtual void score (const candidates_t &candidates, const diffs_t &diffs, statscores_t &scores) const
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 void setScoreData (ScoreData *data)
virtual void setFactors (const std::string &factors)
virtual void setFilter (const std::string &filterCommand)

Protected Attributes

ScopedVector< Scorerm_scorers
ScopedVector< ScoreDatam_scorers_score_data
std::vector< float > m_scorer_weights


Detailed Description

Class that includes other scorers eg. Interpolated HAMMING and BLEU scorer

Definition at line 14 of file InterpolatedScorer.h.


Constructor & Destructor Documentation

InterpolatedScorer::InterpolatedScorer ( const std::string &  name,
const std::string &  config 
)

virtual InterpolatedScorer::~InterpolatedScorer (  )  [inline, virtual]

Definition at line 19 of file InterpolatedScorer.h.


Member Function Documentation

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

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

Implements Scorer.

Definition at line 27 of file InterpolatedScorer.h.

References ScopedVector< T >::begin(), ScopedVector< T >::end(), and m_scorers.

Here is the call graph for this function:

virtual void InterpolatedScorer::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 Scorer.

void InterpolatedScorer::score ( const candidates_t candidates,
const diffs_t diffs,
statscores_t scores 
) const [virtual]

The interpolated scorer calls a vector of scorers and combines them with weights

Implements Scorer.

Definition at line 110 of file InterpolatedScorer.cpp.

References ScopedVector< T >::begin(), ScopedVector< T >::end(), m_scorer_weights, and m_scorers.

Referenced by setScoreData().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void InterpolatedScorer::setFactors ( const std::string &  factors  )  [virtual]

Set the factors, which should be used for this metric

Reimplemented from Scorer.

virtual void InterpolatedScorer::setFilter ( const std::string &  filterCommand  )  [virtual]

Set unix filter, which will be used to preprocess the sentences

Reimplemented from Scorer.

virtual void InterpolatedScorer::setReferenceFiles ( const std::vector< std::string > &  referenceFiles  )  [virtual]

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

Reimplemented from Scorer.

void InterpolatedScorer::setScoreData ( ScoreData data  )  [virtual]


Member Data Documentation

std::vector<float> InterpolatedScorer::m_scorer_weights [protected]

Definition at line 52 of file InterpolatedScorer.h.

Referenced by score().

Definition at line 46 of file InterpolatedScorer.h.

Referenced by NumberOfScores(), score(), and setScoreData().

Definition at line 50 of file InterpolatedScorer.h.

Referenced by setScoreData().


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

Generated on Sat Jun 30 00:30:12 2012 for Moses by  doxygen 1.5.9