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:
authorphikoehn <pkoehn@inf.ed.ac.uk>2012-11-25 00:13:30 +0400
committerphikoehn <pkoehn@inf.ed.ac.uk>2012-11-25 00:13:30 +0400
commit51afd322a1ab71dcd40de7b9f037607eae8681b2 (patch)
tree111cedc3867c65c10df57226ce031ead4fa152f5
parentb5d08745a599f3bdf537a70e99b71b6f205be07e (diff)
parentbb76c156cf003b29b111da535a358f38bde5b0e4 (diff)
Merge branch 'master' of git://github.com/moses-smt/mosesdecoder
-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())