IOCommandLine.cpp, fixed minor NBestFile output error in LexicalReordering distortion

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@693 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
ccorbett 2006-08-13 19:51:17 +00:00
parent 2a7179a8fa
commit 4e3631e1b0

View File

@ -165,14 +165,18 @@ void IOCommandLine::SetNBest(const LatticePathList &nBestList, long translationI
m_nBestFile << "d: ";
m_nBestFile << path.GetScoreBreakdown().GetScoreForProducer(StaticData::Instance()->GetDistortionScoreProducer()) << " ";
//reordering
// reordering
vector<LexicalReordering*> rms = StaticData::Instance()->GetReorderModels();
if(rms.size() > 0)
{
vector<LexicalReordering*>::iterator iter;
for(iter = rms.begin(); iter != rms.end(); ++iter)
{
m_nBestFile << path.GetScoreBreakdown().GetScoreForProducer(*iter) << " ";
vector<float> scores = path.GetScoreBreakdown().GetScoresForProducer(*iter);
for (size_t j = 0; j<scores.size(); ++j)
{
m_nBestFile << scores[j] << " ";
}
}
}