mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 19:27:11 +03:00
more placeholder code and 'NO BEST TRANSLATION' to stderr for pb
This commit is contained in:
parent
b518b17cfa
commit
a40d9082cd
@ -304,6 +304,10 @@ public:
|
||||
debug << "BEST TRANSLATION: " << *bestHypo << endl;
|
||||
}
|
||||
}
|
||||
else {
|
||||
VERBOSE(1, "NO BEST TRANSLATION" << endl);
|
||||
}
|
||||
|
||||
out << endl;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user