diff options
-rw-r--r-- | moses-cmd/Main.cpp | 4 | ||||
-rw-r--r-- | phrase-extract/extract-main.cpp | 8 |
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; + } + } } } |