mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-28 14:32:38 +03:00
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:
parent
2a7179a8fa
commit
4e3631e1b0
@ -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] << " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user