From a40d9082cd6e418fb0cf2eeb62bd319f03019a13 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Wed, 18 Sep 2013 23:47:50 +0200 Subject: more placeholder code and 'NO BEST TRANSLATION' to stderr for pb --- phrase-extract/extract-main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'phrase-extract/extract-main.cpp') diff --git a/phrase-extract/extract-main.cpp b/phrase-extract/extract-main.cpp index a13cd41b4..a26654abb 100644 --- a/phrase-extract/extract-main.cpp +++ b/phrase-extract/extract-main.cpp @@ -928,6 +928,14 @@ bool ExtractTask::checkPlaceholders (const SentenceAlignment &sentence, int star if (sentence.alignedToT[pos].size() != 1) { return false; } + else { + // check it actually lines up to another placeholder + int targetPos = sentence.alignedToT[pos][0]; + const string &otherWord = sentence.target[targetPos]; + if (!isPlaceholder(otherWord)) { + return false; + } + } } } -- cgit v1.2.3