diff options
-rw-r--r-- | decoder/ff_klm.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/decoder/ff_klm.cc b/decoder/ff_klm.cc index f262229b..9ba2cbaa 100644 --- a/decoder/ff_klm.cc +++ b/decoder/ff_klm.cc @@ -84,6 +84,7 @@ class KLanguageModelImpl { if (cur_word == kSOS_) { if (state.ValidLength() > 0) { p = -100; } state = ngram_->BeginSentenceState(); + context_complete = true; } else { const lm::ngram::State scopy(state); p = ngram_->Score(scopy, cur_word, state); @@ -111,6 +112,7 @@ class KLanguageModelImpl { if (cur_word == kSOS_) { if (state.ValidLength() > 0) p = -100; state = ngram_->BeginSentenceState(); + context_complete = true; } else { const lm::ngram::State scopy(state); p = ngram_->Score(scopy, cur_word, state); |