diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-18 01:00:34 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-18 01:00:34 +0300 |
commit | 173d958f4de905572307131a2e10c67612a9b4da (patch) | |
tree | 0d8ee3926dd138ed3ae3b8b19e10b1ab44fd19e0 /moses/Word.cpp | |
parent | 2683b58b537e12b23993c99f3a4e38b4106b2b34 (diff) | |
parent | ecbe68e6f87814134859d64e826bac9c56a4a15e (diff) |
Merge branch 'master' of github.com:moses-smt/mosesdecoder
Diffstat (limited to 'moses/Word.cpp')
-rw-r--r-- | moses/Word.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/moses/Word.cpp b/moses/Word.cpp index 7dfedee4f..2421d4055 100644 --- a/moses/Word.cpp +++ b/moses/Word.cpp @@ -28,6 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "FactorCollection.h" #include "StaticData.h" // needed to determine the FactorDelimiter #include "util/exception.hh" +#include "util/string_stream.hh" #include "util/tokenize_piece.hh" using namespace std; @@ -94,7 +95,7 @@ void Word::Merge(const Word &sourceWord) std::string Word::GetString(const vector<FactorType> factorType,bool endWithBlank) const { - stringstream strme; + util::StringStream strme; const std::string& factorDelimiter = StaticData::Instance().GetFactorDelimiter(); bool firstPass = true; unsigned int stop = min(max_fax(),factorType.size()); @@ -210,7 +211,7 @@ TO_STRING_BODY(Word); // friend ostream& operator<<(ostream& out, const Word& word) { - stringstream strme; + util::StringStream strme; const std::string& factorDelimiter = StaticData::Instance().GetFactorDelimiter(); bool firstPass = true; unsigned int stop = max_fax(); @@ -223,7 +224,7 @@ ostream& operator<<(ostream& out, const Word& word) } else { strme << factorDelimiter; } - strme << *factor; + strme << factor->GetString(); } } out << strme.str() << " "; |