Modified code in Manager.cpp so that option -osgx outputs a superset of -osg.

This commit is contained in:
Germán 2011-10-27 13:26:08 +02:00
parent 694d62cfcc
commit 899293243a

View File

@ -676,19 +676,26 @@ void OutputSearchNode(long translationId, std::ostream &outputSearchGraphStream,
else
outputSearchGraphStream << " hyp=" << searchNode.hypo->GetId();
outputSearchGraphStream << " back=" << prevHypo->GetId();
outputSearchGraphStream << " stack=" << searchNode.hypo->GetWordsBitmap().GetNumWordsCovered()
<< " back=" << prevHypo->GetId()
<< " score=" << searchNode.hypo->GetScore()
<< " transition=" << (searchNode.hypo->GetScore() - prevHypo->GetScore());
if (searchNode.recombinationHypo != NULL)
outputSearchGraphStream << " recombined=" << searchNode.recombinationHypo->GetId();
outputSearchGraphStream << " forward=" << searchNode.forward << " fscore=" << searchNode.fscore
<< " covered=" << searchNode.hypo->GetCurrSourceWordsRange().GetStartPos()
<< "-" << searchNode.hypo->GetCurrSourceWordsRange().GetEndPos();
// Modified so that -osgx is a superset of -osg (GST Oct 2011)
ScoreComponentCollection scoreBreakdown = searchNode.hypo->GetScoreBreakdown();
scoreBreakdown.MinusEquals( prevHypo->GetScoreBreakdown() );
outputSearchGraphStream << " [ ";
outputSearchGraphStream << " scores=[ ";
StaticData::Instance().GetScoreIndexManager().PrintLabeledScores( outputSearchGraphStream, scoreBreakdown );
outputSearchGraphStream << " ]";
// added this so that we will have the span in the input covered
// (DNM, 19 Nov 2010)
outputSearchGraphStream << " covered=" <<
searchNode.hypo->GetCurrSourceWordsRange().GetStartPos()
<< "-" <<
searchNode.hypo->GetCurrSourceWordsRange().GetEndPos();
outputSearchGraphStream << " out=" << searchNode.hypo->GetSourcePhraseStringRep() << "|" <<
searchNode.hypo->GetCurrTargetPhrase().GetStringRep(outputFactorOrder) << endl;
// outputSearchGraphStream << " out=" << searchNode.hypo->GetCurrTargetPhrase().GetStringRep(outputFactorOrder) << endl;