Moses::PrefixTreeMap Class Reference

#include <PrefixTreeMap.h>

Collaboration diagram for Moses::PrefixTreeMap:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PrefixTreeMap ()
 ~PrefixTreeMap ()
void FreeMemory ()
int Read (const std::string &fileNameStem, int numVocs=-1)
void GetCandidates (const IPhrase &key, Candidates *cands)
void GetCandidates (const PPimp &p, Candidates *cands)
std::vector< std::string const * > ConvertPhrase (const IPhrase &p, unsigned int voc) const
IPhrase ConvertPhrase (const std::vector< std::string > &p, unsigned int voc) const
LabelId ConvertWord (const std::string &w, unsigned int voc) const
std::string ConvertWord (LabelId w, unsigned int voc) const
PPimpGetRoot ()
PPimpExtend (PPimp *p, LabelId wi)
PPimpExtend (PPimp *p, const std::string w, size_t voc)

Static Public Attributes

static const LabelId MagicWord = std::numeric_limits<LabelId>::max() - 1


Detailed Description

Definition at line 96 of file PrefixTreeMap.h.


Constructor & Destructor Documentation

Moses::PrefixTreeMap::PrefixTreeMap (  )  [inline]

Definition at line 99 of file PrefixTreeMap.h.

References Moses::PrefixTreeF< T, D >::setDefault().

Here is the call graph for this function:

Moses::PrefixTreeMap::~PrefixTreeMap (  ) 

Definition at line 68 of file PrefixTreeMap.cpp.

References Moses::fClose(), and FreeMemory().

Here is the call graph for this function:


Member Function Documentation

IPhrase Moses::PrefixTreeMap::ConvertPhrase ( const std::vector< std::string > &  p,
unsigned int  voc 
) const

Definition at line 201 of file PrefixTreeMap.cpp.

References index, and UTIL_THROW_IF2.

std::vector< std::string const * > Moses::PrefixTreeMap::ConvertPhrase ( const IPhrase p,
unsigned int  voc 
) const

Definition at line 189 of file PrefixTreeMap.cpp.

References UTIL_THROW_IF2.

std::string Moses::PrefixTreeMap::ConvertWord ( LabelId  w,
unsigned int  voc 
) const

Definition at line 220 of file PrefixTreeMap.cpp.

References InvalidLabelId, MagicWord, and UTIL_THROW_IF2.

LabelId Moses::PrefixTreeMap::ConvertWord ( const std::string &  w,
unsigned int  voc 
) const

Definition at line 213 of file PrefixTreeMap.cpp.

References UTIL_THROW_IF2.

Referenced by Extend().

Here is the caller graph for this function:

PPimp* Moses::PrefixTreeMap::Extend ( PPimp p,
const std::string  w,
size_t  voc 
) [inline]

Definition at line 121 of file PrefixTreeMap.h.

References ConvertWord(), and Extend().

Here is the call graph for this function:

PPimp * Moses::PrefixTreeMap::Extend ( PPimp p,
LabelId  wi 
)

Definition at line 238 of file PrefixTreeMap.cpp.

References ObjectPool< T >::get(), Moses::PrefixTreeF< T, D >::getPtr(), Moses::PPimp::idx, InvalidLabelId, Moses::PPimp::isRoot(), Moses::PPimp::isValid(), NULL, Moses::PPimp::ptr(), and UTIL_THROW_IF2.

Referenced by Extend().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::PrefixTreeMap::FreeMemory (  ) 

Definition at line 80 of file PrefixTreeMap.cpp.

References ObjectPool< T >::reset().

Referenced by ~PrefixTreeMap().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::PrefixTreeMap::GetCandidates ( const PPimp p,
Candidates cands 
)

void Moses::PrefixTreeMap::GetCandidates ( const IPhrase key,
Candidates cands 
)

Definition at line 158 of file PrefixTreeMap.cpp.

References Moses::fSeek(), OFF_T, Moses::Candidates::readBin(), and UTIL_THROW_IF2.

Here is the call graph for this function:

PPimp * Moses::PrefixTreeMap::GetRoot (  ) 

Definition at line 233 of file PrefixTreeMap.cpp.

References ObjectPool< T >::get().

Here is the call graph for this function:

int Moses::PrefixTreeMap::Read ( const std::string &  fileNameStem,
int  numVocs = -1 
)

Definition at line 108 of file PrefixTreeMap.cpp.

References Moses::fClose(), Moses::FileExists(), Moses::fOpen(), Moses::fReadVector(), Moses::PrefixTreeF< T, D >::getDefault(), Moses::ReadVoc(), and TRACE_ERR.

Here is the call graph for this function:


Member Data Documentation

const LabelId Moses::PrefixTreeMap::MagicWord = std::numeric_limits<LabelId>::max() - 1 [static]

Definition at line 105 of file PrefixTreeMap.h.

Referenced by ConvertWord(), and Moses::LexicalReorderingTableTree::Create().


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

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