Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--moses/CompactPT/PhraseDecoder.cpp5
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())