mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-10-26 19:37:58 +03:00
abort if try to get substring of confusion network. returning emptyy string just screws things up
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1868 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
03bd63e312
commit
dd9691d28c
@ -178,6 +178,7 @@ void ConfusionNet::Print(std::ostream& out) const {
|
||||
|
||||
Phrase ConfusionNet::GetSubString(const WordsRange&) const {
|
||||
TRACE_ERR("ERROR: call to ConfusionNet::GetSubString\n");
|
||||
abort();
|
||||
return Phrase(Input);
|
||||
}
|
||||
|
||||
|
@ -191,6 +191,7 @@ float LanguageModelIRST::GetValue(const vector<const Word*> &contextFactor, Stat
|
||||
cout << "i=" << i << " -> " << (*contextFactor[i])[factorType]->GetString() << "\n";
|
||||
#endif
|
||||
int lmId = GetLmID((*contextFactor[i])[factorType]->GetString());
|
||||
cerr << (*contextFactor[i])[factorType]->GetString() << " = " << lmId;
|
||||
m_lmtb_ng->pushc(lmId);
|
||||
}
|
||||
|
||||
@ -200,7 +201,8 @@ float LanguageModelIRST::GetValue(const vector<const Word*> &contextFactor, Stat
|
||||
*len = 0;
|
||||
}
|
||||
|
||||
return TransformIRSTScore((float) m_lmtb->clprob(*m_lmtb_ng));
|
||||
float prob = m_lmtb->clprob(*m_lmtb_ng);
|
||||
return TransformIRSTScore(prob);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user