diff options
author | bhaddow <bhaddow@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-10-14 18:01:15 +0400 |
---|---|---|
committer | bhaddow <bhaddow@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-10-14 18:01:15 +0400 |
commit | 7c0d9c34da706f2fd07054acb36169a51e0e297a (patch) | |
tree | 41114047804027bfd0683a41556bf460b6e4910f /mert/FeatureStats.cpp | |
parent | 967b725d73abeb1f924fd7b5be57288c6571d9e8 (diff) |
Fix formatting of pro input file
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4360 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'mert/FeatureStats.cpp')
-rw-r--r-- | mert/FeatureStats.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mert/FeatureStats.cpp b/mert/FeatureStats.cpp index 719f9ae3e..3d2b1d1d0 100644 --- a/mert/FeatureStats.cpp +++ b/mert/FeatureStats.cpp @@ -42,11 +42,11 @@ void SparseVector::set(string name, FeatureStatsType value) { fvector_[id] = value; } -void SparseVector::write(ostream& out) const { +void SparseVector::write(ostream& out, const string& sep) const { for (fvector_t::const_iterator i = fvector_.begin(); i != fvector_.end(); ++i) { if (abs((float)(i->second)) < 0.00001) continue; string name = id2name_[i->first]; - out << name << " " << i->second << " "; + out << name << sep << i->second << " "; } } @@ -220,7 +220,7 @@ ostream& operator<<(ostream& o, const FeatureStats& e) o << e.get(i) << " "; } // sparse features - e.getSparse().write(o); + e.getSparse().write(o,""); return o; } |