#include <OxLMMapper.h>
Public Member Functions | |
OxLMMapper (const boost::shared_ptr< oxlm::Vocabulary > &vocab, bool pos_back_off, const FactorType &pos_factor_type) | |
int | convert (const Word &word) const |
void | convert (const std::vector< const Word * > &contextFactor, std::vector< int > &ids, int &word) const |
Protected Types | |
typedef std::map< const Moses::Factor *, int > | Coll |
Protected Attributes | |
bool | posBackOff |
FactorType | posFactorType |
Coll | moses2Oxlm |
int | kUNKNOWN |
Definition at line 13 of file OxLMMapper.h.
typedef std::map<const Moses::Factor*, int> Moses::OxLMMapper::Coll [protected] |
Definition at line 32 of file OxLMMapper.h.
Moses::OxLMMapper::OxLMMapper | ( | const boost::shared_ptr< oxlm::Vocabulary > & | vocab, | |
bool | pos_back_off, | |||
const FactorType & | pos_factor_type | |||
) |
Definition at line 10 of file OxLMMapper.cpp.
References Moses::FactorCollection::AddFactor(), Moses::FactorCollection::Instance(), kUNKNOWN, moses2Oxlm, and str.
void Moses::OxLMMapper::convert | ( | const std::vector< const Word * > & | contextFactor, | |
std::vector< int > & | ids, | |||
int & | word | |||
) | const |
int Moses::OxLMMapper::convert | ( | const Word & | word | ) | const |
Definition at line 26 of file OxLMMapper.cpp.
References Moses::Word::GetFactor(), kUNKNOWN, moses2Oxlm, posBackOff, and posFactorType.
int Moses::OxLMMapper::kUNKNOWN [protected] |
Coll Moses::OxLMMapper::moses2Oxlm [protected] |
bool Moses::OxLMMapper::posBackOff [protected] |
Definition at line 29 of file OxLMMapper.h.
Referenced by convert(), and Moses::OxLMParallelMapper::convertSource().
FactorType Moses::OxLMMapper::posFactorType [protected] |
Definition at line 30 of file OxLMMapper.h.
Referenced by convert(), and Moses::OxLMParallelMapper::convertSource().