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:24:12 +0400
committerNicola Bertoldi <bertoldi@fbk.eu>2013-08-14 14:24:12 +0400
commit3b932a1f97a71aee325118199f603da12720534f (patch)
treec5c1fc7007bfe431b97a42bb4f802b9b7c9f0de3 /moses/Util.cpp
parent2716c66c055137725397694454ee3cfd968a1d3e (diff)
beautify
Diffstat (limited to 'moses/Util.cpp')
-rw-r--r--moses/Util.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/moses/Util.cpp b/moses/Util.cpp
index 2c6540a55..00baae2cc 100644
--- a/moses/Util.cpp
+++ b/moses/Util.cpp
@@ -114,20 +114,19 @@ std::vector< std::map<std::string, std::string> > ProcessAndStripDLT(std::string
bool check_dlt = true;
std::cerr << "GLOBAL START" << endl;
- while (check_dlt)
- {
+ while (check_dlt) {
// std::cerr << "index:|" << index << "|" << endl;
size_t start = lline.find("<dlt");
- if (start == std::string::npos)
- { //no more dlt tags
+ if (start == std::string::npos) {
+ //no more dlt tags
check_dlt = false;
continue;
}
size_t close = lline.find("/>");
- if (close == std::string::npos)
- { // error: dlt tag is not ended
- check_dlt = false;
- continue;
+ if (close == std::string::npos) {
+ // error: dlt tag is not ended
+ check_dlt = false;
+ continue;
}
std::string dlt = Trim(lline.substr(start+4, close-start-4));
// std::cerr << "dlt:|" << dlt << "|" << endl;
@@ -146,7 +145,7 @@ std::vector< std::map<std::string, std::string> > ProcessAndStripDLT(std::string
if (val[0] == '"') {
val = val.substr(1);
// it admits any double quotation mark in the value of the attribute
- // it assumes that just one attribute is present in the tag,
+ // it assumes that just one attribute is present in the tag,
// it assumes that the value starts and ends with double quotation mark
size_t close = val.rfind('"');
if (close == std::string::npos) {
@@ -170,7 +169,7 @@ std::vector< std::map<std::string, std::string> > ProcessAndStripDLT(std::string
}
label = Trim(label);
dlt = Trim(dlt);
-
+
tmp_meta[label] = val;
}
}