#include <OxLM.h>
Public Member Functions | |
OxLM (const std::string &line) | |
~OxLM () | |
void | SetParameter (const std::string &key, const std::string &value) |
void | Load (AllOptions::ptr const &opts) |
override to load model files | |
virtual LMResult | GetValue (const std::vector< const Word * > &contextFactor, State *finalState=0) const |
virtual void | InitializeForInput (ttasksptr const &ttask) |
Called before search and collecting of translation options. | |
virtual void | CleanUpAfterSentenceProcessing (const InputType &source) |
Protected Attributes | |
Model | model |
boost::shared_ptr< OxLMMapper > | mapper |
int | kSTART |
int | kSTOP |
int | kUNKNOWN |
bool | normalized |
bool | posBackOff |
FactorType | posFactorType |
bool | persistentCache |
boost::thread_specific_ptr < oxlm::QueryCache > | cache |
int | cacheHits |
int | totalHits |
Definition at line 18 of file OxLM.h.
Moses::OxLM< Model >::OxLM | ( | const std::string & | line | ) |
Moses::OxLM< Model >::~OxLM | ( | ) | [inline] |
Definition at line 40 of file OxLM.cpp.
References Moses::OxLM< Model >::cache, Moses::OxLM< Model >::cacheHits, Moses::LanguageModelImplementation::m_filePath, Moses::OxLM< Model >::persistentCache, and Moses::OxLM< Model >::totalHits.
void Moses::OxLM< Model >::CleanUpAfterSentenceProcessing | ( | const InputType & | source | ) | [inline, virtual] |
Reimplemented from Moses::FeatureFunction.
Definition at line 197 of file OxLM.cpp.
References Moses::InputType::GetTranslationId(), Moses::LanguageModelImplementation::m_filePath, Moses::OxLM< Model >::model, and Moses::OxLM< Model >::persistentCache.
virtual LMResult Moses::OxLM< Model >::GetValue | ( | const std::vector< const Word * > & | contextFactor, | |
State * | finalState = 0 | |||
) | const [virtual] |
Implements Moses::LanguageModelSingleFactor.
void Moses::OxLM< Model >::InitializeForInput | ( | ttasksptr const & | ttask | ) | [inline, virtual] |
Called before search and collecting of translation options.
Reimplemented from Moses::FeatureFunction.
Definition at line 180 of file OxLM.cpp.
References Moses::InputType::GetTranslationId(), Moses::LanguageModelImplementation::m_filePath, and Moses::OxLM< Model >::persistentCache.
void Moses::OxLM< Model >::Load | ( | AllOptions::ptr const & | opts | ) | [inline, virtual] |
override to load model files
Reimplemented from Moses::FeatureFunction.
Definition at line 73 of file OxLM.cpp.
References Moses::OxLM< Model >::kSTART, Moses::OxLM< Model >::kSTOP, Moses::OxLM< Model >::kUNKNOWN, Moses::LanguageModelImplementation::m_filePath, Moses::LanguageModelImplementation::m_nGramOrder, Moses::OxLM< Model >::mapper, Moses::OxLM< Model >::model, Moses::OxLM< Model >::posBackOff, Moses::OxLM< Model >::posFactorType, and UTIL_THROW_IF2.
void Moses::OxLM< Model >::SetParameter | ( | const std::string & | key, | |
const std::string & | value | |||
) | [virtual] |
Reimplemented from Moses::LanguageModelSingleFactor.
boost::thread_specific_ptr<oxlm::QueryCache> Moses::OxLM< Model >::cache [mutable, protected] |
int Moses::OxLM< Model >::cacheHits [mutable, protected] |
int Moses::OxLM< Model >::kSTART [protected] |
int Moses::OxLM< Model >::kSTOP [protected] |
int Moses::OxLM< Model >::kUNKNOWN [protected] |
boost::shared_ptr<OxLMMapper> Moses::OxLM< Model >::mapper [protected] |
Model Moses::OxLM< Model >::model [protected] |
Definition at line 45 of file OxLM.h.
Referenced by Moses::OxLM< Model >::CleanUpAfterSentenceProcessing(), and Moses::OxLM< Model >::Load().
bool Moses::OxLM< Model >::normalized [protected] |
bool Moses::OxLM< Model >::persistentCache [protected] |
Definition at line 57 of file OxLM.h.
Referenced by Moses::OxLM< Model >::CleanUpAfterSentenceProcessing(), Moses::OxLM< Model >::InitializeForInput(), and Moses::OxLM< Model >::~OxLM().
bool Moses::OxLM< Model >::posBackOff [protected] |
FactorType Moses::OxLM< Model >::posFactorType [protected] |
int Moses::OxLM< Model >::totalHits [mutable, protected] |