mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-29 06:52:34 +03:00
Don't do anything if we don't have enough ngrams
This commit is contained in:
parent
85db12549c
commit
b2b1d352d4
@ -46,6 +46,10 @@ void BilingualLM::EvaluateWithSourceContext(const InputType &input
|
||||
, ScoreComponentCollection *estimatedFutureScore) const
|
||||
{
|
||||
double value = 0;
|
||||
if (target_ngrams > targetPhrase.GetSize()) {
|
||||
//We have too small of a phrase.
|
||||
return;
|
||||
}
|
||||
for (size_t i = 0; i < targetPhrase.GetSize() - target_ngrams; ++i) {
|
||||
//Get source word indexes
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user