diff options
author | Germán <gsanchis@cimirlo.(none)> | 2011-10-27 15:26:08 +0400 |
---|---|---|
committer | Germán <gsanchis@cimirlo.(none)> | 2011-10-27 15:29:46 +0400 |
commit | 899293243abcbba2af013e5175aa65bebd5e18d3 (patch) | |
tree | 0906b676c824103ae9f60b80dd845ca0a68ad99b /moses | |
parent | 694d62cfcc7dddad28c5a32ec0d525af28698cfd (diff) |
Modified code in Manager.cpp so that option -osgx outputs a superset of -osg.
Diffstat (limited to 'moses')
-rw-r--r-- | moses/src/Manager.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/moses/src/Manager.cpp b/moses/src/Manager.cpp index 9ceda2f84..1f0c6168c 100644 --- a/moses/src/Manager.cpp +++ b/moses/src/Manager.cpp @@ -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; |