#include <nplm.hh>


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) |
Definition at line 54 of file nplm.hh.
| lm::np::Model::Model | ( | const std::string & | file | ) | [explicit] |
| Model::~Model | ( | ) | [virtual] |
| 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().


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

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


1.5.9