#include <virtual_interface.hh>
Public Member Functions | |
virtual | ~Vocabulary () |
WordIndex | BeginSentence () const |
WordIndex | EndSentence () const |
WordIndex | NotFound () const |
virtual WordIndex | Index (const StringPiece &str) const =0 |
virtual WordIndex | Index (const std::string &str) const |
virtual WordIndex | Index (const char *str) const |
Protected Member Functions | |
Vocabulary () | |
Vocabulary (WordIndex begin_sentence, WordIndex end_sentence, WordIndex not_found) | |
void | SetSpecial (WordIndex begin_sentence, WordIndex end_sentence, WordIndex not_found) |
Protected Attributes | |
WordIndex | begin_sentence_ |
WordIndex | end_sentence_ |
WordIndex | not_found_ |
Definition at line 29 of file virtual_interface.hh.
lm::base::Vocabulary::~Vocabulary | ( | ) | [virtual] |
lm::base::Vocabulary::Vocabulary | ( | ) | [inline, protected] |
Definition at line 51 of file virtual_interface.hh.
lm::base::Vocabulary::Vocabulary | ( | WordIndex | begin_sentence, | |
WordIndex | end_sentence, | |||
WordIndex | not_found | |||
) | [inline, protected] |
Definition at line 53 of file virtual_interface.hh.
References SetSpecial().
WordIndex lm::base::Vocabulary::BeginSentence | ( | ) | const [inline] |
WordIndex lm::base::Vocabulary::EndSentence | ( | ) | const [inline] |
virtual WordIndex lm::base::Vocabulary::Index | ( | const char * | str | ) | const [inline, virtual] |
Definition at line 45 of file virtual_interface.hh.
References Index().
virtual WordIndex lm::base::Vocabulary::Index | ( | const std::string & | str | ) | const [inline, virtual] |
Reimplemented in lm::np::Vocabulary.
Definition at line 42 of file virtual_interface.hh.
References Index().
virtual WordIndex lm::base::Vocabulary::Index | ( | const StringPiece & | str | ) | const [pure virtual] |
Implemented in lm::ngram::SortedVocabulary, lm::ngram::ProbingVocabulary, and lm::np::Vocabulary.
Referenced by Index().
WordIndex lm::base::Vocabulary::NotFound | ( | ) | const [inline] |
void lm::base::Vocabulary::SetSpecial | ( | WordIndex | begin_sentence, | |
WordIndex | end_sentence, | |||
WordIndex | not_found | |||
) | [protected] |
Definition at line 10 of file virtual_interface.cc.
References begin_sentence_, end_sentence_, and not_found_.
Referenced by lm::ngram::ProbingVocabulary::LoadedBinary(), lm::ngram::SortedVocabulary::LoadedBinary(), lm::ngram::SortedVocabulary::Populated(), and Vocabulary().
WordIndex lm::base::Vocabulary::begin_sentence_ [protected] |
Definition at line 59 of file virtual_interface.hh.
Referenced by BeginSentence(), and SetSpecial().
WordIndex lm::base::Vocabulary::end_sentence_ [protected] |
WordIndex lm::base::Vocabulary::not_found_ [protected] |