lm::base::Vocabulary Class Reference

#include <virtual_interface.hh>

Inheritance diagram for lm::base::Vocabulary:

Inheritance graph
[legend]

List of all members.

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_


Detailed Description

Definition at line 29 of file virtual_interface.hh.


Constructor & Destructor Documentation

lm::base::Vocabulary::~Vocabulary (  )  [virtual]

Reimplemented in lm::np::Vocabulary.

Definition at line 8 of file virtual_interface.cc.

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().

Here is the call graph for this function:


Member Function Documentation

WordIndex lm::base::Vocabulary::BeginSentence (  )  const [inline]

Definition at line 33 of file virtual_interface.hh.

References begin_sentence_.

WordIndex lm::base::Vocabulary::EndSentence (  )  const [inline]

Definition at line 34 of file virtual_interface.hh.

References end_sentence_.

virtual WordIndex lm::base::Vocabulary::Index ( const char *  str  )  const [inline, virtual]

Definition at line 45 of file virtual_interface.hh.

References Index().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the caller graph for this function:

WordIndex lm::base::Vocabulary::NotFound (  )  const [inline]

Definition at line 35 of file virtual_interface.hh.

References not_found_.

void lm::base::Vocabulary::SetSpecial ( WordIndex  begin_sentence,
WordIndex  end_sentence,
WordIndex  not_found 
) [protected]


Member Data Documentation

Definition at line 59 of file virtual_interface.hh.

Referenced by BeginSentence(), and SetSpecial().

Definition at line 59 of file virtual_interface.hh.

Referenced by EndSentence(), and SetSpecial().

Definition at line 59 of file virtual_interface.hh.

Referenced by NotFound(), and SetSpecial().


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

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