#include <SentenceLevelScorer.h>
Public Member Functions | |
SentenceLevelScorer (const std::string &name, const std::string &config) | |
~SentenceLevelScorer () | |
virtual void | score (const candidates_t &candidates, const diffs_t &diffs, statscores_t &scores) |
virtual statscore_t | calculateScore (const std::vector< statscore_t > &totals) const |
Protected Member Functions | |
void | Init () |
Protected Attributes | |
ScorerRegularisationStrategy | m_regularisationStrategy |
size_t | m_regularisationWindow |
Definition at line 22 of file SentenceLevelScorer.h.
MosesTuning::SentenceLevelScorer::SentenceLevelScorer | ( | const std::string & | name, | |
const std::string & | config | |||
) |
MosesTuning::SentenceLevelScorer::~SentenceLevelScorer | ( | ) |
Definition at line 27 of file SentenceLevelScorer.cpp.
virtual statscore_t MosesTuning::SentenceLevelScorer::calculateScore | ( | const std::vector< statscore_t > & | totals | ) | const [inline, virtual] |
Calculate score based on a vector of sufficient statistics.
Implements MosesTuning::Scorer.
Definition at line 34 of file SentenceLevelScorer.h.
Referenced by score().
void MosesTuning::SentenceLevelScorer::Init | ( | ) | [protected] |
Definition at line 29 of file SentenceLevelScorer.cpp.
References FALSE, MosesTuning::Scorer::getConfig(), MosesTuning::Scorer::m_enable_preserve_case, m_regularisationStrategy, m_regularisationWindow, MosesTuning::REG_AVERAGE, MosesTuning::REG_MINIMUM, MosesTuning::REG_NONE, and TRUE.
void MosesTuning::SentenceLevelScorer::score | ( | const candidates_t & | candidates, | |
const diffs_t & | diffs, | |||
statscores_t & | scores | |||
) | [virtual] |
The sentence level scores have already been calculated, just need to average them and include the differences. Allows scores which are floats.
Definition at line 66 of file SentenceLevelScorer.cpp.
References calculateScore(), end, MosesTuning::ScoreArray::get(), MosesTuning::ScoreStats::get(), MosesTuning::ScoreData::get(), k, m_regularisationStrategy, m_regularisationWindow, MosesTuning::Scorer::m_score_data, MosesTuning::REG_AVERAGE, MosesTuning::REG_NONE, sid, MosesTuning::ScoreStats::size(), MosesTuning::ScoreArray::size(), MosesTuning::ScoreData::size(), and Moses::stats.
size_t MosesTuning::SentenceLevelScorer::m_regularisationWindow [protected] |