diff options
-rw-r--r-- | moses/CompactPT/PhraseDecoder.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/moses/CompactPT/PhraseDecoder.cpp b/moses/CompactPT/PhraseDecoder.cpp index f8b656a94..3f838ffa1 100644 --- a/moses/CompactPT/PhraseDecoder.cpp +++ b/moses/CompactPT/PhraseDecoder.cpp @@ -392,6 +392,11 @@ TargetPhraseVectorPtr PhraseDecoder::DecodeCollection( Phrase subPhrase = sourcePhrase.GetSubString(WordsRange(srcStart, srcEnd)); subTpv = CreateTargetPhraseCollection(subPhrase, false); } + else { + // false positive consistency check + if(rank >= tpv->size()-1) + return TargetPhraseVectorPtr(); + } // false positive consistency check if(subTpv != NULL && rank < subTpv->size()) |