|
Joshua
open source statistical hierarchical phrase-based machine translation system
|
#include <vocab.hh>
Classes | |
| struct | IdentityHash |
Public Member Functions | |
| ProbingVocabulary () | |
| 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) |
| 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 Types | |
| typedef util::ProbingHashTable < util::ByteAlignedPacking < uint64_t, WordIndex > , IdentityHash > | Lookup |
Private Attributes | |
| Lookup | lookup_ |
| WordIndex | available_ |
| bool | saw_unk_ |
| EnumerateVocab * | enumerate_ |
typedef util::ProbingHashTable<util::ByteAlignedPacking<uint64_t, WordIndex>, IdentityHash> lm::ngram::ProbingVocabulary::Lookup [private] |
| WordIndex lm::ngram::ProbingVocabulary::Bound | ( | ) | const |
| void lm::ngram::ProbingVocabulary::ConfigureEnumerate | ( | EnumerateVocab * | to, |
| std::size_t | max_entries | ||
| ) |
| void lm::ngram::ProbingVocabulary::FinishedLoading | ( | ProbBackoff * | reorder_vocab | ) |
| WordIndex lm::ngram::ProbingVocabulary::Index | ( | const StringPiece & | str | ) | const [virtual] |
Implements lm::base::Vocabulary.
| WordIndex lm::ngram::ProbingVocabulary::Insert | ( | const StringPiece & | str | ) |
| void lm::ngram::ProbingVocabulary::LoadedBinary | ( | int | fd, |
| EnumerateVocab * | to | ||
| ) |
| bool lm::ngram::ProbingVocabulary::SawUnk | ( | ) | const |
| void lm::ngram::ProbingVocabulary::SetupMemory | ( | void * | start, |
| std::size_t | allocated, | ||
| std::size_t | entries, | ||
| const Config & | config | ||
| ) |
| std::size_t lm::ngram::ProbingVocabulary::Size | ( | std::size_t | entries, |
| const Config & | config | ||
| ) | [static] |
Lookup lm::ngram::ProbingVocabulary::lookup_ [private] |
bool lm::ngram::ProbingVocabulary::saw_unk_ [private] |