#include <dsgHyp.h>
Public Member Functions | |
dsgHypothesis () | |
~dsgHypothesis () | |
void | calculateDsgProb (DsgLM &ptrDsgLM, Desegmenter &, bool isCompleted, const AlignmentInfo &align, int sourceOffset, bool optimistic) |
void | calculateDsgProbinIsol (DsgLM &ptrDsgLM, Desegmenter &, const AlignmentInfo &align) |
void | setPhrases (std::vector< std::string > &val1) |
void | setDelta (double val1) |
void | setState (const FFState *prev_state) |
dsgState * | saveState () |
void | print () |
void | populateScores (std::vector< float > &scores, const int numFeatures) |
void | setState (const lm::ngram::State &val) |
bool | isPrefix (const std::string &) |
bool | isSuffix (const std::string &) |
bool | isStem (const std::string &) |
bool | isValidChain (const std::string &, std::vector< std::string > &chain) |
vector< string > | grouper (std::vector< std::string > &, std::vector< std::vector< int > > &, int, const AlignmentInfo &align, bool) |
Definition at line 60 of file dsgHyp.h.
Moses::dsgHypothesis::dsgHypothesis | ( | ) |
Definition at line 57 of file dsgHyp.cpp.
void Moses::dsgHypothesis::calculateDsgProb | ( | DsgLM & | ptrDsgLM, | |
Desegmenter & | desegT, | |||
bool | isCompleted, | |||
const AlignmentInfo & | align, | |||
int | sourceOffset, | |||
bool | optimistic | |||
) |
Definition at line 277 of file dsgHyp.cpp.
References begin, end, grouper(), isPrefix(), isSuffix(), sapt::next(), Moses::KenDsgBase::Score(), Moses::KenDsgBase::ScoreEndSentence(), and Moses::Desegmenter::Search().
Referenced by Moses::DesegModel::EvaluateWhenApplied().
void Moses::dsgHypothesis::calculateDsgProbinIsol | ( | DsgLM & | ptrDsgLM, | |
Desegmenter & | desegT, | |||
const AlignmentInfo & | align | |||
) |
Definition at line 223 of file dsgHyp.cpp.
References grouper(), isPrefix(), isSuffix(), Moses::KenDsgBase::Score(), and Moses::Desegmenter::Search().
Referenced by Moses::DesegModel::EvaluateInIsolation().
vector<string> Moses::dsgHypothesis::grouper | ( | std::vector< std::string > & | , | |
std::vector< std::vector< int > > & | , | |||
int | , | |||
const AlignmentInfo & | align, | |||
bool | ||||
) |
Referenced by calculateDsgProb(), and calculateDsgProbinIsol().
bool Moses::dsgHypothesis::isPrefix | ( | const std::string & | tok | ) |
Definition at line 99 of file dsgHyp.cpp.
Referenced by calculateDsgProb(), calculateDsgProbinIsol(), and isValidChain().
bool Moses::dsgHypothesis::isStem | ( | const std::string & | tok | ) |
Definition at line 117 of file dsgHyp.cpp.
Referenced by isValidChain().
bool Moses::dsgHypothesis::isSuffix | ( | const std::string & | tok | ) |
Definition at line 108 of file dsgHyp.cpp.
Referenced by calculateDsgProb(), calculateDsgProbinIsol(), and isValidChain().
bool Moses::dsgHypothesis::isValidChain | ( | const std::string & | tok, | |
std::vector< std::string > & | chain | |||
) |
chain stores segmented tokens that are in process of building a word The function checks if tok contributes to the word being formed in chain
Definition at line 133 of file dsgHyp.cpp.
References isPrefix(), isStem(), and isSuffix().
void Moses::dsgHypothesis::populateScores | ( | std::vector< float > & | scores, | |
const int | numFeatures | |||
) |
Referenced by Moses::DesegModel::EvaluateInIsolation(), and Moses::DesegModel::EvaluateWhenApplied().
void Moses::dsgHypothesis::print | ( | ) |
Definition at line 387 of file dsgHyp.cpp.
dsgState * Moses::dsgHypothesis::saveState | ( | ) |
Definition at line 77 of file dsgHyp.cpp.
References Moses::dsgState::saveState().
Referenced by Moses::DesegModel::EvaluateWhenApplied().
void Moses::dsgHypothesis::setDelta | ( | double | val1 | ) | [inline] |
void Moses::dsgHypothesis::setPhrases | ( | std::vector< std::string > & | val1 | ) | [inline] |
Definition at line 83 of file dsgHyp.h.
Referenced by Moses::DesegModel::EvaluateInIsolation(), and Moses::DesegModel::EvaluateWhenApplied().
void Moses::dsgHypothesis::setState | ( | const lm::ngram::State & | val | ) | [inline] |
void Moses::dsgHypothesis::setState | ( | const FFState * | prev_state | ) |
Definition at line 67 of file dsgHyp.cpp.
References NULL.
Referenced by Moses::DesegModel::EvaluateInIsolation(), and Moses::DesegModel::EvaluateWhenApplied().