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
parentb518b17cfa7ce28570badeea07cce05c4f66cb93 (diff)
more placeholder code and 'NO BEST TRANSLATION' to stderr for pb
-rw-r--r--moses-cmd/Main.cpp4
-rw-r--r--phrase-extract/extract-main.cpp8
2 files changed, 12 insertions, 0 deletions
diff --git a/moses-cmd/Main.cpp b/moses-cmd/Main.cpp
index 4f9c2dd17..9f990cd6e 100644
--- a/moses-cmd/Main.cpp
+++ b/moses-cmd/Main.cpp
@@ -304,6 +304,10 @@ public:
debug << "BEST TRANSLATION: " << *bestHypo << endl;
}
}
+ else {
+ VERBOSE(1, "NO BEST TRANSLATION" << endl);
+ }
+
out << endl;
}
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;
+ }
+ }
}
}