#include <LexicalReorderingTable.h>
Public Member Functions | |
LexicalReorderingTableTree (const std::string &filePath, const std::vector< FactorType > &f_factors, const std::vector< FactorType > &e_factors, const std::vector< FactorType > &c_factors) | |
~LexicalReorderingTableTree () | |
bool | IsCacheEnabled () const |
void | EnableCache () |
void | DisableCache () |
void | ClearCache () |
virtual std::vector< float > | GetScore (const Phrase &f, const Phrase &e, const Phrase &c) |
virtual void | InitializeForInput (ttasksptr const &ttask) |
virtual void | InitializeForInputPhrase (const Phrase &f) |
Static Public Member Functions | |
static bool | Create (std::istream &inFile, const std::string &outFileName) |
Definition at line 127 of file LexicalReorderingTable.h.
Moses::LexicalReorderingTableTree::LexicalReorderingTableTree | ( | const std::string & | filePath, | |
const std::vector< FactorType > & | f_factors, | |||
const std::vector< FactorType > & | e_factors, | |||
const std::vector< FactorType > & | c_factors | |||
) |
Definition at line 213 of file LexicalReorderingTable.cpp.
Moses::LexicalReorderingTableTree::~LexicalReorderingTableTree | ( | ) |
Definition at line 226 of file LexicalReorderingTable.cpp.
void Moses::LexicalReorderingTableTree::ClearCache | ( | ) | [inline] |
Definition at line 170 of file LexicalReorderingTable.h.
Referenced by InitializeForInput(), and InitializeForInputPhrase().
bool Moses::LexicalReorderingTableTree::Create | ( | std::istream & | inFile, | |
const std::string & | outFileName | |||
) | [static] |
Definition at line 313 of file LexicalReorderingTable.cpp.
References Moses::PrefixTreeF< T, D >::create(), Moses::fClose(), Moses::FloorScore(), Moses::fOpen(), Moses::fTell(), Moses::fWriteVector(), InvalidLabelId, Moses::PrefixTreeMap::MagicWord, NULL, Moses::TokenizeMultiCharSeparator(), TRACE_ERR, Moses::TransformScore(), UTIL_THROW_IF2, LVoc< A, B >::Write(), and Moses::Candidates::writeBin().
void Moses::LexicalReorderingTableTree::DisableCache | ( | ) | [inline] |
Definition at line 167 of file LexicalReorderingTable.h.
Referenced by InitializeForInput().
void Moses::LexicalReorderingTableTree::EnableCache | ( | ) | [inline] |
Definition at line 164 of file LexicalReorderingTable.h.
Scores Moses::LexicalReorderingTableTree::GetScore | ( | const Phrase & | f, | |
const Phrase & | e, | |||
const Phrase & | c | |||
) | [virtual] |
Implements Moses::LexicalReorderingTable.
Definition at line 231 of file LexicalReorderingTable.cpp.
References Moses::Phrase::GetSize(), Moses::LexicalReorderingTable::m_FactorsC, Moses::LexicalReorderingTable::m_FactorsE, Moses::LexicalReorderingTable::m_FactorsF, and UTIL_THROW_IF2.
void Moses::LexicalReorderingTableTree::InitializeForInput | ( | ttasksptr const & | ttask | ) | [virtual] |
Reimplemented from Moses::LexicalReorderingTable.
Definition at line 294 of file LexicalReorderingTable.cpp.
References ClearCache(), and DisableCache().
virtual void Moses::LexicalReorderingTableTree::InitializeForInputPhrase | ( | const Phrase & | f | ) | [inline, virtual] |
Reimplemented from Moses::LexicalReorderingTable.
Definition at line 184 of file LexicalReorderingTable.h.
References ClearCache().
bool Moses::LexicalReorderingTableTree::IsCacheEnabled | ( | ) | const [inline] |
Definition at line 161 of file LexicalReorderingTable.h.