#include <StatisticsBasedScorer.h>
Public Member Functions | |
StatisticsBasedScorer (const std::string &name, const std::string &config) | |
virtual | ~StatisticsBasedScorer () |
virtual void | score (const candidates_t &candidates, const diffs_t &diffs, statscores_t &scores) const |
Protected Types | |
enum | RegularisationType { NONE, AVERAGE, MINIMUM } |
Protected Member Functions | |
virtual statscore_t | calculateScore (const std::vector< int > &totals) const =0 |
Protected Attributes | |
RegularisationType | m_regularization_type |
std::size_t | m_regularization_window |
Definition at line 17 of file StatisticsBasedScorer.h.
enum StatisticsBasedScorer::RegularisationType [protected] |
StatisticsBasedScorer::StatisticsBasedScorer | ( | const std::string & | name, | |
const std::string & | config | |||
) |
virtual StatisticsBasedScorer::~StatisticsBasedScorer | ( | ) | [inline, virtual] |
Definition at line 21 of file StatisticsBasedScorer.h.
virtual statscore_t StatisticsBasedScorer::calculateScore | ( | const std::vector< int > & | totals | ) | const [protected, pure virtual] |
Calculate the actual score.
Implemented in BleuScorer, CderScorer, MergeScorer, PermutationScorer, PerScorer, SemposScorer, and TerScorer.
Referenced by score().
void StatisticsBasedScorer::score | ( | const candidates_t & | candidates, | |
const diffs_t & | diffs, | |||
statscores_t & | scores | |||
) | const [virtual] |
Score using each of the candidate index, then go through the diffs applying each in turn, and calculating a new score each time.
Implements Scorer.
Definition at line 51 of file StatisticsBasedScorer.cpp.
References AVERAGE, calculateScore(), end, ScoreArray::get(), ScoreStats::get(), ScoreData::get(), m_regularization_type, m_regularization_window, Scorer::m_score_data, NONE, ScoreStats::size(), ScoreArray::size(), ScoreData::size(), and Moses::stats.
std::size_t StatisticsBasedScorer::m_regularization_window [protected] |