#include <InterpolatedScorer.h>


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< Scorer > | m_scorers |
| ScopedVector< ScoreData > | m_scorers_score_data |
| std::vector< float > | m_scorer_weights |
Definition at line 14 of file InterpolatedScorer.h.
| InterpolatedScorer::InterpolatedScorer | ( | const std::string & | name, | |
| const std::string & | config | |||
| ) |
| virtual InterpolatedScorer::~InterpolatedScorer | ( | ) | [inline, virtual] |
Definition at line 19 of file InterpolatedScorer.h.
| 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.

| 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().


| 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] |
Set the score data, prior to scoring.
Reimplemented from Scorer.
Definition at line 65 of file InterpolatedScorer.cpp.
References ScoreData::add(), ScoreArray::add(), ScoreStats::add(), ScopedVector< T >::begin(), ScopedVector< T >::end(), ScoreStats::get(), ScoreData::get(), Scorer::m_score_data, m_scorers, m_scorers_score_data, ScoreData::NumberOfScores(), ScopedVector< T >::push_back(), score(), ScoreArray::setIndex(), ScoreArray::size(), and ScoreData::size().

std::vector<float> InterpolatedScorer::m_scorer_weights [protected] |
ScopedVector<Scorer> InterpolatedScorer::m_scorers [protected] |
Definition at line 46 of file InterpolatedScorer.h.
Referenced by NumberOfScores(), score(), and setScoreData().
1.5.9