Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/moses
diff options
context:
space:
mode:
authorhieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230>2007-08-08 18:20:30 +0400
committerhieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230>2007-08-08 18:20:30 +0400
commit94b9e097f59dd3b3bc344cbd9dd90c285a924622 (patch)
treeb3ce47a785e47ef660951d5be718ba504fbcff37 /moses
parentf3c8483ffb2b282514980dfffefbbd83d0a27f84 (diff)
don't skip empty lines
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1447 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'moses')
-rwxr-xr-xmoses/src/Sentence.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/moses/src/Sentence.cpp b/moses/src/Sentence.cpp
index ed0df1f3f..27228d829 100755
--- a/moses/src/Sentence.cpp
+++ b/moses/src/Sentence.cpp
@@ -31,12 +31,12 @@ int Sentence::Read(std::istream& in,const std::vector<FactorType>& factorOrder)
const std::string& factorDelimiter = StaticData::Instance().GetFactorDelimiter();
std::string line;
std::map<std::string, std::string> meta;
- do
- {
- if (getline(in, line, '\n').eof()) return 0;
- line = Trim(line);
- meta = ProcessAndStripSGML(line);
- } while (line == "");
+
+ if (getline(in, line, '\n').eof())
+ return 0;
+ line = Trim(line);
+ meta = ProcessAndStripSGML(line);
+
if (meta.find("id") != meta.end()) { this->SetTranslationId(atol(meta["id"].c_str())); }
//parse XML markup in translation line