Moses::DynamicCacheBasedLanguageModel Class Reference

#include <DynamicCacheBasedLanguageModel.h>

Inheritance diagram for Moses::DynamicCacheBasedLanguageModel:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DynamicCacheBasedLanguageModel (const std::string &line)
 ~DynamicCacheBasedLanguageModel ()
const std::string GetName ()
void SetName (const std::string name)
bool IsUseable (const FactorMask &mask) const
void Load (AllOptions::ptr const &opts)
 override to load model files
void Load (const std::string filestr)
void Execute (std::string command)
void SetParameter (const std::string &key, const std::string &value)
void ExecuteDlt (std::map< std::string, std::string > dlt_meta)
void ClearEntries (std::string &entries)
void Insert (std::string &entries)
void Clear ()
virtual void EvaluateInIsolation (const Phrase &source, const TargetPhrase &targetPhrase, ScoreComponentCollection &scoreBreakdown, ScoreComponentCollection &estimatedScores) 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 EvaluateWhenApplied (const Hypothesis &hypo, ScoreComponentCollection *accumulator) const
void EvaluateWhenApplied (const ChartHypothesis &hypo, ScoreComponentCollection *accumulator) const
void SetQueryType (size_t type)
void SetScoreType (size_t type)
void SetMaxAge (unsigned int age)

Static Public Member Functions

static const
DynamicCacheBasedLanguageModel
Instance (const std::string &name)
static
DynamicCacheBasedLanguageModel
InstanceNonConst (const std::string &name)
static const
DynamicCacheBasedLanguageModel
Instance ()
static
DynamicCacheBasedLanguageModel
InstanceNonConst ()

Static Protected Attributes

static
DynamicCacheBasedLanguageModel
s_instance = NULL
static std::map< const
std::string,
DynamicCacheBasedLanguageModel * > 
s_instance_map


Detailed Description

Calculates score for the Dynamic Cache-Based pseudo LM

Definition at line 38 of file DynamicCacheBasedLanguageModel.h.


Constructor & Destructor Documentation

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

Moses::DynamicCacheBasedLanguageModel::~DynamicCacheBasedLanguageModel (  ) 

Definition at line 31 of file DynamicCacheBasedLanguageModel.cpp.


Member Function Documentation

void Moses::DynamicCacheBasedLanguageModel::Clear (  ) 

Definition at line 318 of file DynamicCacheBasedLanguageModel.cpp.

Referenced by ExecuteDlt().

Here is the caller graph for this function:

void Moses::DynamicCacheBasedLanguageModel::ClearEntries ( std::string &  entries  ) 

Definition at line 223 of file DynamicCacheBasedLanguageModel.cpp.

References Moses::TokenizeMultiCharSeparator(), and VERBOSE.

Here is the call graph for this function:

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

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

Implements Moses::FeatureFunction.

Definition at line 145 of file DynamicCacheBasedLanguageModel.h.

void Moses::DynamicCacheBasedLanguageModel::EvaluateWhenApplied ( const ChartHypothesis hypo,
ScoreComponentCollection accumulator 
) const [inline, virtual]

Same for chart-based features.

Implements Moses::StatelessFeatureFunction.

Definition at line 153 of file DynamicCacheBasedLanguageModel.h.

void Moses::DynamicCacheBasedLanguageModel::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 149 of file DynamicCacheBasedLanguageModel.h.

void Moses::DynamicCacheBasedLanguageModel::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 137 of file DynamicCacheBasedLanguageModel.h.

void Moses::DynamicCacheBasedLanguageModel::Execute ( std::string  command  ) 

Definition at line 286 of file DynamicCacheBasedLanguageModel.cpp.

References Moses::Tokenize(), and VERBOSE.

Here is the call graph for this function:

void Moses::DynamicCacheBasedLanguageModel::ExecuteDlt ( std::map< std::string, std::string >  dlt_meta  ) 

Definition at line 266 of file DynamicCacheBasedLanguageModel.cpp.

References Clear(), and Load().

Here is the call graph for this function:

const std::string Moses::DynamicCacheBasedLanguageModel::GetName (  )  [inline]

Definition at line 88 of file DynamicCacheBasedLanguageModel.h.

void Moses::DynamicCacheBasedLanguageModel::Insert ( std::string &  entries  ) 

Definition at line 246 of file DynamicCacheBasedLanguageModel.cpp.

References Moses::TokenizeMultiCharSeparator(), and VERBOSE.

Here is the call graph for this function:

static const DynamicCacheBasedLanguageModel& Moses::DynamicCacheBasedLanguageModel::Instance (  )  [inline, static]

Definition at line 111 of file DynamicCacheBasedLanguageModel.h.

References s_instance.

static const DynamicCacheBasedLanguageModel* Moses::DynamicCacheBasedLanguageModel::Instance ( const std::string &  name  )  [inline, static]

Definition at line 95 of file DynamicCacheBasedLanguageModel.h.

References NULL, and s_instance_map.

static DynamicCacheBasedLanguageModel& Moses::DynamicCacheBasedLanguageModel::InstanceNonConst (  )  [inline, static]

Definition at line 114 of file DynamicCacheBasedLanguageModel.h.

References s_instance.

static DynamicCacheBasedLanguageModel* Moses::DynamicCacheBasedLanguageModel::InstanceNonConst ( const std::string &  name  )  [inline, static]

Definition at line 102 of file DynamicCacheBasedLanguageModel.h.

References NULL, and s_instance_map.

bool Moses::DynamicCacheBasedLanguageModel::IsUseable ( const FactorMask mask  )  const [inline, virtual]

Implements Moses::FeatureFunction.

Definition at line 118 of file DynamicCacheBasedLanguageModel.h.

void Moses::DynamicCacheBasedLanguageModel::Load ( const std::string  filestr  ) 

Definition at line 334 of file DynamicCacheBasedLanguageModel.cpp.

References Moses::Tokenize(), and VERBOSE.

Here is the call graph for this function:

void Moses::DynamicCacheBasedLanguageModel::Load ( AllOptions::ptr const &  opts  )  [virtual]

override to load model files

Reimplemented from Moses::FeatureFunction.

Definition at line 326 of file DynamicCacheBasedLanguageModel.cpp.

References Moses::FeatureFunction::m_options, and VERBOSE.

Referenced by ExecuteDlt().

Here is the caller graph for this function:

void Moses::DynamicCacheBasedLanguageModel::SetMaxAge ( unsigned int  age  ) 

Definition at line 420 of file DynamicCacheBasedLanguageModel.cpp.

References VERBOSE.

Referenced by SetParameter().

Here is the caller graph for this function:

void Moses::DynamicCacheBasedLanguageModel::SetName ( const std::string  name  )  [inline]

Definition at line 91 of file DynamicCacheBasedLanguageModel.h.

void Moses::DynamicCacheBasedLanguageModel::SetParameter ( const std::string &  key,
const std::string &  value 
) [virtual]

Reimplemented from Moses::FeatureFunction.

Definition at line 68 of file DynamicCacheBasedLanguageModel.cpp.

References Moses::Scan< bool >(), SetMaxAge(), SetQueryType(), SetScoreType(), and VERBOSE.

Here is the call graph for this function:

void Moses::DynamicCacheBasedLanguageModel::SetQueryType ( size_t  type  ) 

Definition at line 385 of file DynamicCacheBasedLanguageModel.cpp.

References CBLM_QUERY_TYPE_ALLSUBSTRINGS, CBLM_QUERY_TYPE_WHOLESTRING, and VERBOSE.

Referenced by SetParameter().

Here is the caller graph for this function:

void Moses::DynamicCacheBasedLanguageModel::SetScoreType ( size_t  type  ) 


Member Data Documentation

std::map< const std::string, DynamicCacheBasedLanguageModel * > Moses::DynamicCacheBasedLanguageModel::s_instance_map [static, protected]


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

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