lm::ngram::detail::GenericModel< Search, VocabularyT > Class Template Reference

#include <model.hh>

Inheritance diagram for lm::ngram::detail::GenericModel< Search, VocabularyT >:

Inheritance graph
[legend]
Collaboration diagram for lm::ngram::detail::GenericModel< Search, VocabularyT >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 GenericModel (const char *file, const Config &config=Config())
FullScoreReturn FullScore (const State &in_state, const WordIndex new_word, State &out_state) const
FullScoreReturn FullScoreForgotState (const WordIndex *context_rbegin, const WordIndex *context_rend, const WordIndex new_word, State &out_state) const
void GetState (const WordIndex *context_rbegin, const WordIndex *context_rend, State &out_state) const
FullScoreReturn ExtendLeft (const WordIndex *add_rbegin, const WordIndex *add_rend, const float *backoff_in, uint64_t extend_pointer, unsigned char extend_length, float *backoff_out, unsigned char &next_use) const
float UnRest (const uint64_t *pointers_begin, const uint64_t *pointers_end, unsigned char first_length) const

Static Public Member Functions

static uint64_t Size (const std::vector< uint64_t > &counts, const Config &config=Config())

Static Public Attributes

static const ModelType kModelType = Search::kModelType
static const unsigned int kVersion = Search::kVersion


Detailed Description

template<class Search, class VocabularyT>
class lm::ngram::detail::GenericModel< Search, VocabularyT >

Definition at line 30 of file model.hh.


Constructor & Destructor Documentation

template<class Search , class VocabularyT >
lm::ngram::detail::GenericModel< Search, VocabularyT >::GenericModel ( const char *  file,
const Config config = Config() 
) [inline, explicit]


Member Function Documentation

template<class Search , class VocabularyT >
FullScoreReturn lm::ngram::detail::GenericModel< Search, VocabularyT >::ExtendLeft ( const WordIndex add_rbegin,
const WordIndex add_rend,
const float *  backoff_in,
uint64_t  extend_pointer,
unsigned char  extend_length,
float *  backoff_out,
unsigned char &  next_use 
) const [inline]

template<class Search , class VocabularyT >
FullScoreReturn lm::ngram::detail::GenericModel< Search, VocabularyT >::FullScore ( const State in_state,
const WordIndex  new_word,
State out_state 
) const [inline]

template<class Search , class VocabularyT >
FullScoreReturn lm::ngram::detail::GenericModel< Search, VocabularyT >::FullScoreForgotState ( const WordIndex context_rbegin,
const WordIndex context_rend,
const WordIndex  new_word,
State out_state 
) const [inline]

Definition at line 142 of file model.cc.

References lm::FullScoreReturn::ngram_length, lm::base::Model::Order(), and lm::FullScoreReturn::prob.

Here is the call graph for this function:

template<class Search , class VocabularyT >
void lm::ngram::detail::GenericModel< Search, VocabularyT >::GetState ( const WordIndex context_rbegin,
const WordIndex context_rend,
State out_state 
) const [inline]

Definition at line 169 of file model.cc.

References lm::ngram::State::backoff, lm::ngram::HasExtension(), lm::ngram::State::length, lm::base::Model::Order(), and lm::ngram::State::words.

Here is the call graph for this function:

template<class Search , class VocabularyT >
uint64_t lm::ngram::detail::GenericModel< Search, VocabularyT >::Size ( const std::vector< uint64_t > &  counts,
const Config config = Config() 
) [inline, static]

Definition at line 23 of file model.cc.

Referenced by lm::ngram::detail::GenericModel< Search, VocabularyT >::GenericModel().

Here is the caller graph for this function:

template<class Search , class VocabularyT >
float lm::ngram::detail::GenericModel< Search, VocabularyT >::UnRest ( const uint64_t *  pointers_begin,
const uint64_t *  pointers_end,
unsigned char  first_length 
) const [inline]

Definition at line 100 of file model.hh.


Member Data Documentation

template<class Search , class VocabularyT >
const ModelType lm::ngram::detail::GenericModel< Search, VocabularyT >::kModelType = Search::kModelType [inline, static]

template<class Search , class VocabularyT >
const unsigned int lm::ngram::detail::GenericModel< Search, VocabularyT >::kVersion = Search::kVersion [static]


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

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