mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-24 20:32:59 +03:00
backoff for default GetTargetPhraseCollectionBatch(), used by binary pt and compact pt
This commit is contained in:
parent
2830ed9968
commit
bf7c033271
@ -160,11 +160,16 @@ GetTargetPhraseCollectionBatch(const InputPathList &inputPathQueue) const
|
||||
{
|
||||
InputPathList::const_iterator iter;
|
||||
for (iter = inputPathQueue.begin(); iter != inputPathQueue.end(); ++iter) {
|
||||
InputPath &node = **iter;
|
||||
InputPath &inputPath = **iter;
|
||||
|
||||
const Phrase &phrase = node.GetPhrase();
|
||||
// backoff
|
||||
if (!SatisfyBackoff(inputPath)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const Phrase &phrase = inputPath.GetPhrase();
|
||||
const TargetPhraseCollection *targetPhrases = this->GetTargetPhraseCollectionLEGACY(phrase);
|
||||
node.SetTargetPhrases(*this, targetPhrases, NULL);
|
||||
inputPath.SetTargetPhrases(*this, targetPhrases, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user