This commit is contained in:
Hieu Hoang 2016-08-15 11:49:10 +01:00
parent ef74195a2d
commit b1ae8d133f
2 changed files with 6 additions and 2 deletions

View File

@ -88,7 +88,7 @@ void Manager::Decode()
}
}
//m_stacks.OutputStacks();
m_stacks.OutputStacks();
}
void Manager::InitActiveChart(SCFG::InputPath &path)

View File

@ -133,6 +133,7 @@ void UnknownWordPenalty::EvaluateInIsolation(const System &system,
}
// SCFG ///////////////////////////////////////////////////////////////////////////////////////////
void UnknownWordPenalty::InitActiveChart(
MemPool &pool,
const SCFG::Manager &mgr,
@ -155,13 +156,16 @@ void UnknownWordPenalty::Lookup(MemPool &pool,
}
if (path.GetNumRules()) {
// only create rules if no other rules
return;
}
// don't do 1st of last word
// don't do 1st if 1st word
if (path.range.GetStartPos() == 0) {
return;
}
// don't do 1st if last word
const SCFG::Sentence &sentence = static_cast<const SCFG::Sentence&>(mgr.GetInput());
if (path.range.GetStartPos() + 1 == sentence.GetSize()) {
return;