summaryrefslogtreecommitdiff
path: root/klm/lm
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-08-01 17:32:37 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-08-01 17:32:37 +0200
commiteb3ea4fd5dff1c94b237af792c9f7bf421d79d96 (patch)
tree2acd7674f36e6dc6e815c5856519fdea1a2d6bf8 /klm/lm
parente816274e337a066df1b1e86ef00136a021a17caf (diff)
parent193d137056c3c4f73d66f8db84691d63307de894 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'klm/lm')
-rw-r--r--klm/lm/model.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/klm/lm/model.cc b/klm/lm/model.cc
index c081788c..a2d31ce0 100644
--- a/klm/lm/model.cc
+++ b/klm/lm/model.cc
@@ -53,9 +53,6 @@ template <class Search, class VocabularyT> void GenericModel<Search, VocabularyT
search_.LoadedBinary();
}
-namespace {
-} // namespace
-
template <class Search, class VocabularyT> void GenericModel<Search, VocabularyT>::InitializeFromARPA(const char *file, const Config &config) {
// Backing file is the ARPA. Steal it so we can make the backing file the mmap output if any.
util::FilePiece f(backing_.file.release(), file, config.messages);
@@ -126,7 +123,7 @@ template <class Search, class VocabularyT> FullScoreReturn GenericModel<Search,
return ret;
}
// i is the order of the backoff we're looking for.
- unsigned char order_minus_2 = 0;
+ unsigned char order_minus_2 = start - 2;
for (const WordIndex *i = context_rbegin + start - 1; i < context_rend; ++i, ++order_minus_2) {
typename Search::MiddlePointer p(search_.LookupMiddle(order_minus_2, *i, node, independent_left, extend_left));
if (!p.Found()) break;