diff options
Diffstat (limited to 'phrase-extract/extract-main.cpp')
-rw-r--r-- | phrase-extract/extract-main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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; + } + } } } |