#include <Model1Feature.h>
Public Member Functions | |
Model1LexicalTable (float floor=1e-7) | |
void | Load (const std::string &fileName, const Model1Vocabulary &vcbS, const Model1Vocabulary &vcbT) |
float | GetProbability (const Factor *wordS, const Factor *wordT) const |
Protected Attributes | |
boost::unordered_map< const Factor *, boost::unordered_map < const Factor *, float > > | m_ltable |
const float | m_floor |
Definition at line 38 of file Model1Feature.h.
Moses::Model1LexicalTable::Model1LexicalTable | ( | float | floor = 1e-7 |
) | [inline] |
Definition at line 41 of file Model1Feature.h.
float Moses::Model1LexicalTable::GetProbability | ( | const Factor * | wordS, | |
const Factor * | wordT | |||
) | const |
Definition at line 122 of file Model1Feature.cpp.
References m_floor, m_ltable, and prob().
Referenced by Moses::Model1Feature::EvaluateWithSourceContext().
void Moses::Model1LexicalTable::Load | ( | const std::string & | fileName, | |
const Model1Vocabulary & | vcbS, | |||
const Model1Vocabulary & | vcbT | |||
) |
Definition at line 98 of file Model1Feature.cpp.
References Moses::InputFileStream::Close(), Moses::Model1Vocabulary::GetWord(), m_ltable, NULL, prob(), Moses::Tokenize(), and UTIL_THROW_IF2.
const float Moses::Model1LexicalTable::m_floor [protected] |
boost::unordered_map< const Factor*, boost::unordered_map< const Factor*, float > > Moses::Model1LexicalTable::m_ltable [protected] |