lm::ngram::GrowableVocab< NewWordAction > Class Template Reference

#include <vocab.hh>

Collaboration diagram for lm::ngram::GrowableVocab< NewWordAction >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

template<class NewWordConstruct >
 GrowableVocab (WordIndex initial_size, const NewWordConstruct &new_word_construct=NewWordAction())
WordIndex Index (const StringPiece &str) const
WordIndex FindOrInsert (const StringPiece &word)
WordIndex Size () const

Static Public Member Functions

static std::size_t MemUsage (WordIndex content)


Detailed Description

template<class NewWordAction = NoOpUniqueWords>
class lm::ngram::GrowableVocab< NewWordAction >

Definition at line 237 of file vocab.hh.


Constructor & Destructor Documentation

template<class NewWordAction = NoOpUniqueWords>
template<class NewWordConstruct >
lm::ngram::GrowableVocab< NewWordAction >::GrowableVocab ( WordIndex  initial_size,
const NewWordConstruct &  new_word_construct = NewWordAction() 
) [inline]

Definition at line 244 of file vocab.hh.

References lm::ngram::GrowableVocab< NewWordAction >::FindOrInsert().

Here is the call graph for this function:


Member Function Documentation

template<class NewWordAction = NoOpUniqueWords>
WordIndex lm::ngram::GrowableVocab< NewWordAction >::FindOrInsert ( const StringPiece word  )  [inline]

template<class NewWordAction = NoOpUniqueWords>
WordIndex lm::ngram::GrowableVocab< NewWordAction >::Index ( const StringPiece str  )  const [inline]

Definition at line 251 of file vocab.hh.

References util::AutoProbing< EntryT, HashT, EqualT >::Find(), and lm::ngram::detail::HashForVocab().

Referenced by lm::builder::CorpusCount::Run().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class NewWordAction = NoOpUniqueWords>
static std::size_t lm::ngram::GrowableVocab< NewWordAction >::MemUsage ( WordIndex  content  )  [inline, static]

Definition at line 239 of file vocab.hh.

References util::AutoProbing< ProbingVocabularyEntry, util::IdentityHash >::MemUsage().

Here is the call graph for this function:

template<class NewWordAction = NoOpUniqueWords>
WordIndex lm::ngram::GrowableVocab< NewWordAction >::Size (  )  const [inline]

Definition at line 266 of file vocab.hh.

References util::AutoProbing< EntryT, HashT, EqualT >::Size().

Referenced by lm::ngram::GrowableVocab< NewWordAction >::FindOrInsert(), and lm::builder::CorpusCount::Run().

Here is the call graph for this function:

Here is the caller graph for this function:


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

Generated on Thu Jul 6 00:32:46 2017 for Moses by  doxygen 1.5.9