#include <PermutationScorer.h>
Public Member Functions | |
PermutationScorer (const std::string &distanceMetric="HAMMING", const std::string &config=std::string()) | |
void | setReferenceFiles (const std::vector< std::string > &referenceFiles) |
void | prepareStats (size_t sid, const std::string &text, ScoreStats &entry) |
size_t | NumberOfScores () const |
bool | useAlignment () const |
Static Public Attributes | |
static const int | SCORE_PRECISION = 5 |
static const int | SCORE_MULTFACT = 100000 |
Protected Member Functions | |
statscore_t | calculateScore (const std::vector< ScoreStatsType > &scores) const |
PermutationScorer (const PermutationScorer &) | |
~PermutationScorer () | |
PermutationScorer & | operator= (const PermutationScorer &) |
int | getNumberWords (const std::string &line) const |
Protected Attributes | |
distanceMetricReferenceChoice_t | m_refChoiceStrategy |
distanceMetric_t | m_distanceMetric |
std::vector< std::vector < Permutation > > | m_referencePerms |
std::vector< size_t > | m_sourceLengths |
std::vector< std::string > | m_referenceAlignments |
Definition at line 26 of file PermutationScorer.h.
MosesTuning::PermutationScorer::PermutationScorer | ( | const std::string & | distanceMetric = "HAMMING" , |
|
const std::string & | config = std::string() | |||
) |
MosesTuning::PermutationScorer::PermutationScorer | ( | const PermutationScorer & | ) | [protected] |
MosesTuning::PermutationScorer::~PermutationScorer | ( | ) | [inline, protected] |
Definition at line 54 of file PermutationScorer.h.
statscore_t MosesTuning::PermutationScorer::calculateScore | ( | const std::vector< ScoreStatsType > & | totals | ) | const [protected, virtual] |
Calculate the actual score.
Implements MosesTuning::StatisticsBasedScorer.
int MosesTuning::PermutationScorer::getNumberWords | ( | const std::string & | line | ) | const [protected] |
size_t MosesTuning::PermutationScorer::NumberOfScores | ( | ) | const [inline, virtual] |
Return the number of statistics needed for the computation of the score.
Implements MosesTuning::Scorer.
Definition at line 37 of file PermutationScorer.h.
PermutationScorer& MosesTuning::PermutationScorer::operator= | ( | const PermutationScorer & | ) | [protected] |
void MosesTuning::PermutationScorer::prepareStats | ( | size_t | sid, | |
const std::string & | text, | |||
ScoreStats & | entry | |||
) |
void MosesTuning::PermutationScorer::setReferenceFiles | ( | const std::vector< std::string > & | referenceFiles | ) | [virtual] |
Set the reference files. This must be called before prepareStats().
Reimplemented from MosesTuning::Scorer.
bool MosesTuning::PermutationScorer::useAlignment | ( | ) | const [inline, virtual] |
The scorer returns if it uses the reference alignment data for permutation distance scores
Reimplemented from MosesTuning::Scorer.
Definition at line 45 of file PermutationScorer.h.
Definition at line 59 of file PermutationScorer.h.
Definition at line 58 of file PermutationScorer.h.
std::vector<std::string> MosesTuning::PermutationScorer::m_referenceAlignments [protected] |
Definition at line 65 of file PermutationScorer.h.
std::vector< std::vector<Permutation> > MosesTuning::PermutationScorer::m_referencePerms [protected] |
Definition at line 63 of file PermutationScorer.h.
std::vector<size_t> MosesTuning::PermutationScorer::m_sourceLengths [protected] |
Definition at line 64 of file PermutationScorer.h.
const int MosesTuning::PermutationScorer::SCORE_MULTFACT = 100000 [static] |
Definition at line 35 of file PermutationScorer.h.
const int MosesTuning::PermutationScorer::SCORE_PRECISION = 5 [static] |
Definition at line 34 of file PermutationScorer.h.