diff options
Diffstat (limited to 'moses/LM/Base.cpp')
-rw-r--r-- | moses/LM/Base.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/moses/LM/Base.cpp b/moses/LM/Base.cpp index 9e74b0d81..8b69626ac 100644 --- a/moses/LM/Base.cpp +++ b/moses/LM/Base.cpp @@ -78,7 +78,11 @@ void LanguageModel::EvaluateInIsolation(const Phrase &source float fullScore, nGramScore; size_t oovCount; - CalcScoreWithContext(targetPhrase.GetTtask(), targetPhrase, fullScore, nGramScore, oovCount); + if (targetPhrase.HasTtaskSPtr()){ + CalcScoreWithContext(targetPhrase.GetTtask(), targetPhrase, fullScore, nGramScore, oovCount); + }else{ + CalcScore(targetPhrase, fullScore, nGramScore, oovCount); + } //CalcScore(targetPhrase, fullScore, nGramScore, oovCount); float estimateScore = fullScore - nGramScore; |