diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-06-28 18:58:59 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-06-28 18:58:59 +0400 |
commit | c7e02eb67743b31f4cfab752c60fe96f8e2ae630 (patch) | |
tree | e25d3c43e239e02ae3adff5262b8f674decb826a /moses | |
parent | f6b3354f396f8d90e273a3a8255b68cfd5f33f70 (diff) |
KenLM e3b5c55910 including rest costs for probing
Diffstat (limited to 'moses')
-rw-r--r-- | moses/src/LM/Ken.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/moses/src/LM/Ken.cpp b/moses/src/LM/Ken.cpp index af2c11774..28d0534cd 100644 --- a/moses/src/LM/Ken.cpp +++ b/moses/src/LM/Ken.cpp @@ -328,15 +328,17 @@ LanguageModel *ConstructKenLM(const std::string &file, ScoreIndexManager &manage lm::ngram::ModelType model_type; if (lm::ngram::RecognizeBinary(file.c_str(), model_type)) { switch(model_type) { - case lm::ngram::HASH_PROBING: + case lm::ngram::PROBING: return new LanguageModelKen<lm::ngram::ProbingModel>(file, manager, factorType, lazy); - case lm::ngram::TRIE_SORTED: + case lm::ngram::REST_PROBING: + return new LanguageModelKen<lm::ngram::RestProbingModel>(file, manager, factorType, lazy); + case lm::ngram::TRIE: return new LanguageModelKen<lm::ngram::TrieModel>(file, manager, factorType, lazy); - case lm::ngram::QUANT_TRIE_SORTED: + case lm::ngram::QUANT_TRIE: return new LanguageModelKen<lm::ngram::QuantTrieModel>(file, manager, factorType, lazy); - case lm::ngram::ARRAY_TRIE_SORTED: + case lm::ngram::ARRAY_TRIE: return new LanguageModelKen<lm::ngram::ArrayTrieModel>(file, manager, factorType, lazy); - case lm::ngram::QUANT_ARRAY_TRIE_SORTED: + case lm::ngram::QUANT_ARRAY_TRIE: return new LanguageModelKen<lm::ngram::QuantArrayTrieModel>(file, manager, factorType, lazy); default: std::cerr << "Unrecognized kenlm model type " << model_type << std::endl; |