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
diff options
context:
space:
mode:
authorNicola Bertoldi <bertoldi@fbk.eu>2013-08-14 14:48:01 +0400
committerNicola Bertoldi <bertoldi@fbk.eu>2013-08-14 14:48:01 +0400
commit2904e519079fc45e9576c65c01d48ef3bf0924af (patch)
treeb445d183fe916764cbc99d3e5f3d9740296be15a /moses/Util.cpp
parent3b932a1f97a71aee325118199f603da12720534f (diff)
bug fixed
Diffstat (limited to 'moses/Util.cpp')
-rw-r--r--moses/Util.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/moses/Util.cpp b/moses/Util.cpp
index 00baae2cc..441075bd2 100644
--- a/moses/Util.cpp
+++ b/moses/Util.cpp
@@ -112,10 +112,9 @@ std::vector< std::map<std::string, std::string> > ProcessAndStripDLT(std::string
std::vector< std::map<std::string, std::string> > meta;
std::string lline = ToLower(line);
bool check_dlt = true;
-
- std::cerr << "GLOBAL START" << endl;
+
+ std::cerr << "GLOBAL START" << endl;
while (check_dlt) {
-// std::cerr << "index:|" << index << "|" << endl;
size_t start = lline.find("<dlt");
if (start == std::string::npos) {
//no more dlt tags
@@ -130,10 +129,10 @@ std::vector< std::map<std::string, std::string> > ProcessAndStripDLT(std::string
}
std::string dlt = Trim(lline.substr(start+4, close-start-4));
// std::cerr << "dlt:|" << dlt << "|" << endl;
- line.erase(start,close+2);
- lline.erase(start,close+2);
+ line.erase(start,close-start+2);
+ lline.erase(start,close-start+2);
- if (dlt == "") continue;
+ if (dlt == ""){
std::map<std::string, std::string> tmp_meta;
for (size_t i = 1; i < dlt.size(); i++) {
@@ -175,6 +174,7 @@ std::vector< std::map<std::string, std::string> > ProcessAndStripDLT(std::string
}
meta.push_back(tmp_meta);
+ }
}
std::cerr << "GLOBAL END" << endl;
return meta;