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:
authorHieu Hoang <hieuhoang@gmail.com>2013-09-19 01:47:50 +0400
committerHieu Hoang <hieuhoang@gmail.com>2013-09-19 01:47:50 +0400
commita40d9082cd6e418fb0cf2eeb62bd319f03019a13 (patch)
tree2778f3237dc93fdfcd2bbd0ebe85d6474489c62b /phrase-extract/extract-main.cpp
parentb518b17cfa7ce28570badeea07cce05c4f66cb93 (diff)
more placeholder code and 'NO BEST TRANSLATION' to stderr for pb
Diffstat (limited to 'phrase-extract/extract-main.cpp')
-rw-r--r--phrase-extract/extract-main.cpp8
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;
+ }
+ }
}
}