lm::np::Model Class Reference

#include <nplm.hh>

Inheritance diagram for lm::np::Model:

Inheritance graph
[legend]
Collaboration diagram for lm::np::Model:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Model (const std::string &file, std::size_t cache_size=1<< 20)
 ~Model ()
FullScoreReturn FullScore (const State &from, 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

Static Public Member Functions

static bool Recognize (const std::string &file)


Detailed Description

Definition at line 54 of file nplm.hh.


Constructor & Destructor Documentation

lm::np::Model::Model ( const std::string &  file  )  [explicit]

Model::~Model (  )  [virtual]

Reimplemented from lm::base::Model.

Definition at line 76 of file nplm.cc.


Member Function Documentation

FullScoreReturn Model::FullScore ( const State from,
const WordIndex  new_word,
State out_state 
) const

Definition at line 78 of file nplm.cc.

References lm::np::Backend::lookup_from_staging(), lm::FullScoreReturn::ngram_length, NPLM_MAX_ORDER, lm::np::Backend::order(), lm::FullScoreReturn::prob, lm::np::Backend::staging_ngram(), and lm::np::State::words.

Referenced by FullScoreForgotState().

Here is the call graph for this function:

Here is the caller graph for this function:

FullScoreReturn Model::FullScoreForgotState ( const WordIndex context_rbegin,
const WordIndex context_rend,
const WordIndex  new_word,
State out_state 
) const

Definition at line 102 of file nplm.cc.

References FullScore(), lm::base::Model::Order(), and state.

Here is the call graph for this function:

bool Model::Recognize ( const std::string &  file  )  [static]

Definition at line 43 of file nplm.cc.

References util::scoped_fd::get(), util::OpenReadOrThrow(), and util::ReadOrThrow().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:


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

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