#include <CderScorer.h>
Public Member Functions | |
CderScorer (const std::string &config, bool allowed_long_jumps=true) | |
~CderScorer () | |
virtual void | setReferenceFiles (const std::vector< std::string > &referenceFiles) |
virtual void | prepareStats (std::size_t sid, const std::string &text, ScoreStats &entry) |
virtual void | prepareStatsVector (std::size_t sid, const std::string &text, std::vector< int > &stats) |
virtual std::size_t | NumberOfScores () const |
virtual float | calculateScore (const std::vector< int > &comps) const |
Definition at line 12 of file CderScorer.h.
CderScorer::CderScorer | ( | const std::string & | config, | |
bool | allowed_long_jumps = true | |||
) | [explicit] |
CderScorer::~CderScorer | ( | ) |
Definition at line 21 of file CderScorer.cpp.
virtual float CderScorer::calculateScore | ( | const std::vector< int > & | totals | ) | const [virtual] |
Calculate the actual score.
Implements StatisticsBasedScorer.
Referenced by MergeScorer::calculateScore().
virtual std::size_t CderScorer::NumberOfScores | ( | ) | const [inline, virtual] |
Return the number of statistics needed for the computation of the score.
Implements Scorer.
Definition at line 23 of file CderScorer.h.
Referenced by MergeScorer::calculateScore().
virtual void CderScorer::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.
virtual void CderScorer::prepareStatsVector | ( | std::size_t | sid, | |
const std::string & | text, | |||
std::vector< int > & | stats | |||
) | [virtual] |
virtual void CderScorer::setReferenceFiles | ( | const std::vector< std::string > & | referenceFiles | ) | [virtual] |
Set the reference files. This must be called before prepareStats().
Reimplemented from Scorer.