diff options
author | Eva Hasler <ehasler@saxnot.inf.ed.ac.uk> | 2012-03-08 18:58:12 +0400 |
---|---|---|
committer | Eva Hasler <ehasler@saxnot.inf.ed.ac.uk> | 2012-03-08 18:58:12 +0400 |
commit | cb4a0d36bf6538630d9c02346cfd4c702c0432ab (patch) | |
tree | 6fe8eb102269cc128132b403dbec385d100516d7 /moses-cmd | |
parent | beaa5b8e5d97751ba39bc4f1e73969a319738274 (diff) |
change output format for sparse features
Diffstat (limited to 'moses-cmd')
-rw-r--r-- | moses-cmd/src/IOWrapper.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/moses-cmd/src/IOWrapper.cpp b/moses-cmd/src/IOWrapper.cpp index 86a42c82d..49ab4063e 100644 --- a/moses-cmd/src/IOWrapper.cpp +++ b/moses-cmd/src/IOWrapper.cpp @@ -515,13 +515,9 @@ void OutputFeatureScores( std::ostream& out, const TrellisPath &path, const Feat // report each feature else { - for(FVector::FNVmap::const_iterator i = scores.cbegin(); i != scores.cend(); i++) { - if (i->second != 0) { // do not report zero-valued features - if (labeledOutput) - out << " " << i->first << ":"; - out << " " << i->second; - } - } + for(FVector::FNVmap::const_iterator i = scores.cbegin(); i != scores.cend(); i++) + if (i->second != 0) // do not report zero-valued features + out << " " << i->first << "=" << i->second; } } } |