Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
lm::ngram::SortedVocabulary Class Reference

#include <vocab.hh>

Inheritance diagram for lm::ngram::SortedVocabulary:
[legend]
Collaboration diagram for lm::ngram::SortedVocabulary:
[legend]

List of all members.

Public Member Functions

 SortedVocabulary ()
WordIndex Index (const StringPiece &str) const
WordIndex Bound () const
void SetupMemory (void *start, std::size_t allocated, std::size_t entries, const Config &config)
void ConfigureEnumerate (EnumerateVocab *to, std::size_t max_entries)
WordIndex Insert (const StringPiece &str)
void FinishedLoading (ProbBackoff *reorder_vocab)
std::size_t UnkCountChangePadding () const
bool SawUnk () const
void LoadedBinary (int fd, EnumerateVocab *to)

Static Public Member Functions

static size_t Size (std::size_t entries, const Config &config)

Private Attributes

uint64_t * begin_
uint64_t * end_
WordIndex bound_
WordIndex highest_value_
bool saw_unk_
EnumerateVocabenumerate_
std::vector< std::string > strings_to_enumerate_

Constructor & Destructor Documentation


Member Function Documentation

void lm::ngram::SortedVocabulary::ConfigureEnumerate ( EnumerateVocab to,
std::size_t  max_entries 
)

Here is the call graph for this function:

Here is the call graph for this function:

WordIndex lm::ngram::SortedVocabulary::Index ( const StringPiece str) const [virtual]

Implements lm::base::Vocabulary.

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ngram::SortedVocabulary::SetupMemory ( void *  start,
std::size_t  allocated,
std::size_t  entries,
const Config config 
)

Here is the call graph for this function:

std::size_t lm::ngram::SortedVocabulary::Size ( std::size_t  entries,
const Config config 
) [static]

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

uint64_t * lm::ngram::SortedVocabulary::end_ [private]
std::vector<std::string> lm::ngram::SortedVocabulary::strings_to_enumerate_ [private]