|
Joshua
open source statistical hierarchical phrase-based machine translation system
|
#include <model.hh>
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 |
Static Public Member Functions | |
| static size_t | Size (const std::vector< uint64_t > &counts, const Config &config=Config()) |
Static Public Attributes | |
| static const ModelType | kModelType = Search::kModelType |
Private Types | |
| typedef base::ModelFacade < GenericModel< Search, VocabularyT >, State, VocabularyT > | P |
| typedef Search::Middle | Middle |
Private Member Functions | |
| float | SlowBackoffLookup (const WordIndex *const context_rbegin, const WordIndex *const context_rend, unsigned char start) const |
| FullScoreReturn | ScoreExceptBackoff (const WordIndex *context_rbegin, const WordIndex *context_rend, const WordIndex new_word, State &out_state) const |
| void | SetupMemory (void *start, const std::vector< uint64_t > &counts, const Config &config) |
| void | InitializeFromBinary (void *start, const Parameters ¶ms, const Config &config, int fd) |
| void | InitializeFromARPA (const char *file, const Config &config) |
| Backing & | MutableBacking () |
Static Private Member Functions | |
| static void | UpdateConfigFromBinary (int fd, const std::vector< uint64_t > &counts, Config &config) |
Private Attributes | |
| Backing | backing_ |
| VocabularyT | vocab_ |
| Search | search_ |
Friends | |
| void | LoadLM (const char *file, const Config &config, GenericModel< Search, VocabularyT > &to) |
typedef Search::Middle lm::ngram::detail::GenericModel< Search, VocabularyT >::Middle [private] |
typedef base::ModelFacade<GenericModel<Search, VocabularyT>, State, VocabularyT> lm::ngram::detail::GenericModel< Search, VocabularyT >::P [private] |
| lm::ngram::detail::GenericModel< Search, VocabularyT >::GenericModel | ( | const char * | file, |
| const Config & | config = Config() |
||
| ) |
| FullScoreReturn lm::ngram::detail::GenericModel< Search, VocabularyT >::FullScore | ( | const State & | in_state, |
| const WordIndex | new_word, | ||
| State & | out_state | ||
| ) | const |
| FullScoreReturn lm::ngram::detail::GenericModel< Search, VocabularyT >::FullScoreForgotState | ( | const WordIndex * | context_rbegin, |
| const WordIndex * | context_rend, | ||
| const WordIndex | new_word, | ||
| State & | out_state | ||
| ) | const |
| void lm::ngram::detail::GenericModel< Search, VocabularyT >::GetState | ( | const WordIndex * | context_rbegin, |
| const WordIndex * | context_rend, | ||
| State & | out_state | ||
| ) | const |
| void lm::ngram::detail::GenericModel< Search, VocabularyT >::InitializeFromARPA | ( | const char * | file, |
| const Config & | config | ||
| ) | [private] |
| void lm::ngram::detail::GenericModel< Search, VocabularyT >::InitializeFromBinary | ( | void * | start, |
| const Parameters & | params, | ||
| const Config & | config, | ||
| int | fd | ||
| ) | [private] |
| Backing& lm::ngram::detail::GenericModel< Search, VocabularyT >::MutableBacking | ( | ) | [private] |
| FullScoreReturn lm::ngram::detail::GenericModel< Search, VocabularyT >::ScoreExceptBackoff | ( | const WordIndex * | context_rbegin, |
| const WordIndex * | context_rend, | ||
| const WordIndex | new_word, | ||
| State & | out_state | ||
| ) | const [private] |
| void lm::ngram::detail::GenericModel< Search, VocabularyT >::SetupMemory | ( | void * | start, |
| const std::vector< uint64_t > & | counts, | ||
| const Config & | config | ||
| ) | [private] |
| size_t lm::ngram::detail::GenericModel< Search, VocabularyT >::Size | ( | const std::vector< uint64_t > & | counts, |
| const Config & | config = Config() |
||
| ) | [static] |
| float lm::ngram::detail::GenericModel< Search, VocabularyT >::SlowBackoffLookup | ( | const WordIndex *const | context_rbegin, |
| const WordIndex *const | context_rend, | ||
| unsigned char | start | ||
| ) | const [private] |
| static void lm::ngram::detail::GenericModel< Search, VocabularyT >::UpdateConfigFromBinary | ( | int | fd, |
| const std::vector< uint64_t > & | counts, | ||
| Config & | config | ||
| ) | [static, private] |
| void LoadLM | ( | const char * | file, |
| const Config & | config, | ||
| GenericModel< Search, VocabularyT > & | to | ||
| ) | [friend] |
Backing lm::ngram::detail::GenericModel< Search, VocabularyT >::backing_ [private] |
const ModelType lm::ngram::detail::GenericModel< Search, VocabularyT >::kModelType = Search::kModelType [static] |
Search lm::ngram::detail::GenericModel< Search, VocabularyT >::search_ [private] |
VocabularyT lm::ngram::detail::GenericModel< Search, VocabularyT >::vocab_ [private] |