minor change to StringRep fn

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@365 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
hieuhoang1972 2006-07-28 22:28:58 +00:00
parent 1df79b9d75
commit 17478d9f70

View File

@ -111,13 +111,12 @@ Phrase Phrase::GetSubString(const WordsRange &wordsRange) const
std::string Phrase::GetStringRep(const WordsRange &wordsRange)
{
std::string phrase_string = "";
Phrase retPhrase(m_direction);
std::stringstream phrase_string("");
for (size_t currPos = wordsRange.GetStartPos() ; currPos <= wordsRange.GetEndPos() ; currPos++)
{
phrase_string = phrase_string+ " "+ Word::ToString(GetFactorArray(currPos));
phrase_string << " " << Word::ToString(GetFactorArray(currPos));
}
return phrase_string;
return phrase_string.str();
}