diff options
author | phikoehn <pkoehn@inf.ed.ac.uk> | 2012-11-25 00:13:30 +0400 |
---|---|---|
committer | phikoehn <pkoehn@inf.ed.ac.uk> | 2012-11-25 00:13:30 +0400 |
commit | 51afd322a1ab71dcd40de7b9f037607eae8681b2 (patch) | |
tree | 111cedc3867c65c10df57226ce031ead4fa152f5 | |
parent | b5d08745a599f3bdf537a70e99b71b6f205be07e (diff) | |
parent | bb76c156cf003b29b111da535a358f38bde5b0e4 (diff) |
Merge branch 'master' of git://github.com/moses-smt/mosesdecoder
-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()) |