backoff for default GetTargetPhraseCollectionBatch(), used by binary pt and compact pt

This commit is contained in:
Hieu Hoang 2014-05-12 15:50:32 +01:00
parent 2830ed9968
commit bf7c033271

View File

@ -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);
}
}