Exemplo n.º 1
0
void Manager::CreateInputPaths(const InputPath &prevPath, size_t pos)
{
  if (pos >= m_sentence.GetSize()) {
    return;
  }

  Phrase *phrase = new Phrase(prevPath.GetPhrase(), 1);
  phrase->SetLastWord(m_sentence.GetWord(pos));

  InputPath *path = new InputPath(&prevPath, phrase, pos);
  m_inputPathQueue.push_back(path);

  CreateInputPaths(*path, pos + 1);
}