Moses::Model1Vocabulary Class Reference

#include <Model1Feature.h>

Collaboration diagram for Moses::Model1Vocabulary:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Model1Vocabulary ()
bool Store (const Factor *word, const unsigned id)
unsigned StoreIfNew (const Factor *word)
unsigned GetWordID (const Factor *word) const
const FactorGetWord (unsigned id) const
void Load (const std::string &fileName)

Static Public Attributes

static const std::string GIZANULL = "GIZANULL"

Protected Attributes

boost::unordered_map< const
Factor *, unsigned > 
m_lookup
std::vector< const Factor * > m_vocab
const Factorm_NULL


Detailed Description

Definition at line 17 of file Model1Feature.h.


Constructor & Destructor Documentation

Moses::Model1Vocabulary::Model1Vocabulary (  ) 

Definition at line 15 of file Model1Feature.cpp.

References Moses::FactorCollection::AddFactor(), GIZANULL, Moses::FactorCollection::Instance(), m_NULL, and Store().

Here is the call graph for this function:


Member Function Documentation

const Factor * Moses::Model1Vocabulary::GetWord ( unsigned  id  )  const

Definition at line 59 of file Model1Feature.cpp.

References m_vocab, and NULL.

Referenced by Moses::Model1LexicalTable::Load().

Here is the caller graph for this function:

unsigned Moses::Model1Vocabulary::GetWordID ( const Factor word  )  const

Definition at line 50 of file Model1Feature.cpp.

References INVALID_ID, and m_lookup.

void Moses::Model1Vocabulary::Load ( const std::string &  fileName  ) 

bool Moses::Model1Vocabulary::Store ( const Factor word,
const unsigned  id 
)

Definition at line 22 of file Model1Feature.cpp.

References m_lookup, and m_vocab.

Referenced by Load(), and Model1Vocabulary().

Here is the caller graph for this function:

unsigned Moses::Model1Vocabulary::StoreIfNew ( const Factor word  ) 

Definition at line 36 of file Model1Feature.cpp.

References m_lookup, and m_vocab.


Member Data Documentation

const std::string Moses::Model1Vocabulary::GIZANULL = "GIZANULL" [static]

Definition at line 22 of file Model1Feature.h.

Referenced by Model1Vocabulary().

boost::unordered_map<const Factor*, unsigned> Moses::Model1Vocabulary::m_lookup [protected]

Definition at line 32 of file Model1Feature.h.

Referenced by GetWordID(), Store(), and StoreIfNew().

Definition at line 34 of file Model1Feature.h.

Referenced by Model1Vocabulary().

std::vector< const Factor* > Moses::Model1Vocabulary::m_vocab [protected]

Definition at line 33 of file Model1Feature.h.

Referenced by GetWord(), Store(), and StoreIfNew().


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

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