#include <GlobalLexicalModel.h>
Classes | |
struct | ThreadLocalStorage |
Public Member Functions | |
GlobalLexicalModel (const std::string &line) | |
virtual | ~GlobalLexicalModel () |
void | SetParameter (const std::string &key, const std::string &value) |
void | InitializeForInput (ttasksptr const &ttask) |
Called before search and collecting of translation options. | |
bool | IsUseable (const FactorMask &mask) const |
void | EvaluateInIsolation (const Phrase &source, const TargetPhrase &targetPhrase, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection &estimatedScores) const |
void | EvaluateWhenApplied (const Hypothesis &hypo, ScoreComponentCollection *accumulator) const |
void | EvaluateWhenApplied (const ChartHypothesis &hypo, ScoreComponentCollection *accumulator) const |
void | EvaluateWithSourceContext (const InputType &input, const InputPath &inputPath, const TargetPhrase &targetPhrase, const StackVec *stackVec, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection *estimatedScores=NULL) const |
void | EvaluateTranslationOptionListWithSourceContext (const InputType &input, const TranslationOptionList &translationOptionList) const |
Definition at line 34 of file GlobalLexicalModel.h.
Moses::GlobalLexicalModel::GlobalLexicalModel | ( | const std::string & | line | ) |
Definition at line 14 of file GlobalLexicalModel.cpp.
References Moses::FactorCollection::AddFactor(), Moses::Input, Moses::FactorCollection::Instance(), Moses::FeatureFunction::ReadParameters(), and Moses::Word::SetFactor().
Moses::GlobalLexicalModel::~GlobalLexicalModel | ( | ) | [virtual] |
Definition at line 41 of file GlobalLexicalModel.cpp.
void Moses::GlobalLexicalModel::EvaluateInIsolation | ( | const Phrase & | source, | |
const TargetPhrase & | targetPhrase, | |||
ScoreComponentCollection & | scoreBreakdown, | |||
ScoreComponentCollection & | estimatedScores | |||
) | const [inline, virtual] |
void Moses::GlobalLexicalModel::EvaluateTranslationOptionListWithSourceContext | ( | const InputType & | input, | |
const TranslationOptionList & | translationOptionList | |||
) | const [inline, virtual] |
void Moses::GlobalLexicalModel::EvaluateWhenApplied | ( | const ChartHypothesis & | hypo, | |
ScoreComponentCollection * | accumulator | |||
) | const [inline, virtual] |
Same for chart-based features.
Implements Moses::StatelessFeatureFunction.
Definition at line 84 of file GlobalLexicalModel.h.
void Moses::GlobalLexicalModel::EvaluateWhenApplied | ( | const Hypothesis & | hypo, | |
ScoreComponentCollection * | accumulator | |||
) | const [inline, virtual] |
This should be implemented for features that apply to phrase-based models.
Implements Moses::StatelessFeatureFunction.
Definition at line 81 of file GlobalLexicalModel.h.
void Moses::GlobalLexicalModel::EvaluateWithSourceContext | ( | const InputType & | input, | |
const InputPath & | inputPath, | |||
const TargetPhrase & | targetPhrase, | |||
const StackVec * | stackVec, | |||
ScoreComponentCollection & | scoreBreakdown, | |||
ScoreComponentCollection * | estimatedScores = NULL | |||
) | const [virtual] |
Implements Moses::FeatureFunction.
Definition at line 176 of file GlobalLexicalModel.cpp.
References Moses::ScoreComponentCollection::PlusEquals().
void Moses::GlobalLexicalModel::InitializeForInput | ( | ttasksptr const & | ttask | ) | [virtual] |
Called before search and collecting of translation options.
Reimplemented from Moses::FeatureFunction.
Definition at line 117 of file GlobalLexicalModel.cpp.
References Moses::SentenceInput, and UTIL_THROW_IF2.
bool Moses::GlobalLexicalModel::IsUseable | ( | const FactorMask & | mask | ) | const [virtual] |
void Moses::GlobalLexicalModel::SetParameter | ( | const std::string & | key, | |
const std::string & | value | |||
) | [virtual] |