Moses::GlobalLexicalModelUnlimited Class Reference

#include <GlobalLexicalModelUnlimited.h>

Inheritance diagram for Moses::GlobalLexicalModelUnlimited:

Inheritance graph
[legend]
Collaboration diagram for Moses::GlobalLexicalModelUnlimited:

Collaboration graph
[legend]

List of all members.

Classes

struct  ThreadLocalStorage

Public Member Functions

 GlobalLexicalModelUnlimited (const std::string &line)
bool Load (const std::string &filePathSource, const std::string &filePathTarget)
void InitializeForInput (ttasksptr const &ttask)
 Called before search and collecting of translation options.
void EvaluateWhenApplied (const Hypothesis &cur_hypo, ScoreComponentCollection *accumulator) const
void EvaluateWhenApplied (const ChartHypothesis &, int, ScoreComponentCollection *) 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
void EvaluateInIsolation (const Phrase &source, const TargetPhrase &targetPhrase, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection &estimatedScores) const
void AddFeature (ScoreComponentCollection *accumulator, StringPiece sourceTrigger, StringPiece sourceWord, StringPiece targetTrigger, StringPiece targetWord) const


Detailed Description

Discriminatively trained global lexicon model This is a implementation of Mauser et al., 2009's model that predicts each output word from _all_ the input words. The intuition behind this feature is that it uses context words for disambiguation

Definition at line 37 of file GlobalLexicalModelUnlimited.h.


Constructor & Destructor Documentation

Moses::GlobalLexicalModelUnlimited::GlobalLexicalModelUnlimited ( const std::string &  line  ) 

Definition at line 14 of file GlobalLexicalModelUnlimited.cpp.

References Load(), NULL, Moses::Tokenize(), and UTIL_THROW.

Here is the call graph for this function:


Member Function Documentation

void Moses::GlobalLexicalModelUnlimited::AddFeature ( ScoreComponentCollection accumulator,
StringPiece  sourceTrigger,
StringPiece  sourceWord,
StringPiece  targetTrigger,
StringPiece  targetWord 
) const

Definition at line 323 of file GlobalLexicalModelUnlimited.cpp.

References Moses::ScoreComponentCollection::SparsePlusEquals(), and util::StringStream::str().

Referenced by EvaluateWhenApplied().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::GlobalLexicalModelUnlimited::EvaluateInIsolation ( const Phrase source,
const TargetPhrase targetPhrase,
ScoreComponentCollection scoreBreakdown,
ScoreComponentCollection estimatedScores 
) const [inline, virtual]

Implements Moses::FeatureFunction.

Definition at line 100 of file GlobalLexicalModelUnlimited.h.

void Moses::GlobalLexicalModelUnlimited::EvaluateTranslationOptionListWithSourceContext ( const InputType input,
const TranslationOptionList translationOptionList 
) const [inline, virtual]

Implements Moses::FeatureFunction.

Definition at line 96 of file GlobalLexicalModelUnlimited.h.

void Moses::GlobalLexicalModelUnlimited::EvaluateWhenApplied ( const ChartHypothesis ,
int  ,
ScoreComponentCollection  
) const [inline]

Definition at line 82 of file GlobalLexicalModelUnlimited.h.

void Moses::GlobalLexicalModelUnlimited::EvaluateWhenApplied ( const Hypothesis hypo,
ScoreComponentCollection accumulator 
) const [virtual]

void Moses::GlobalLexicalModelUnlimited::EvaluateWithSourceContext ( const InputType input,
const InputPath inputPath,
const TargetPhrase targetPhrase,
const StackVec stackVec,
ScoreComponentCollection scoreBreakdown,
ScoreComponentCollection estimatedScores = NULL 
) const [inline, virtual]

Implements Moses::FeatureFunction.

Definition at line 88 of file GlobalLexicalModelUnlimited.h.

void Moses::GlobalLexicalModelUnlimited::InitializeForInput ( ttasksptr const &  ttask  )  [virtual]

Called before search and collecting of translation options.

Reimplemented from Moses::FeatureFunction.

Definition at line 109 of file GlobalLexicalModelUnlimited.cpp.

References Moses::SentenceInput, and UTIL_THROW_IF2.

bool Moses::GlobalLexicalModelUnlimited::Load ( const std::string &  filePathSource,
const std::string &  filePathTarget 
)

Definition at line 75 of file GlobalLexicalModelUnlimited.cpp.

Referenced by GlobalLexicalModelUnlimited().

Here is the caller graph for this function:


The documentation for this class was generated from the following files:

Generated on Thu Jul 6 00:33:04 2017 for Moses by  doxygen 1.5.9