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:
authorU-DESKTOP-ONHNTIV\hieuh <hieu@hoang.co.uk>2015-08-05 20:15:09 +0300
committerU-DESKTOP-ONHNTIV\hieuh <hieu@hoang.co.uk>2015-08-05 20:15:09 +0300
commit626a53e7dfe463f18b0e685cad0989283dc3748e (patch)
tree665187c002fec14df666981742840bf663f079e4
parent4c3a6a3f3fb66e4f489ae264595f0a1792339ed8 (diff)
compile error on 4.9.3 on cygwin
-rw-r--r--moses/FF/Model1Feature.cpp8
-rw-r--r--phrase-extract/consolidate-main.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/moses/FF/Model1Feature.cpp b/moses/FF/Model1Feature.cpp
index 3bde70cfc..7ea7cd651 100644
--- a/moses/FF/Model1Feature.cpp
+++ b/moses/FF/Model1Feature.cpp
@@ -75,7 +75,7 @@ void Model1Vocabulary::Load(const std::string& fileName)
++i;
std::vector<std::string> tokens = Tokenize(line);
UTIL_THROW_IF2(tokens.size()!=3, "Line " << i << " in " << fileName << " has wrong number of tokens.");
- unsigned id = std::atoll( tokens[0].c_str() );
+ unsigned id = atoll( tokens[0].c_str() );
if (! ( (id == 1) && (tokens[1] == "UNK") )) {
const Factor* factor = factorCollection.AddFactor(tokens[1],false); // TODO: can we assume that the vocabulary is know and filter the model on loading?
bool stored = Store(factor, id);
@@ -86,7 +86,7 @@ void Model1Vocabulary::Load(const std::string& fileName)
++i;
std::vector<std::string> tokens = Tokenize(line);
UTIL_THROW_IF2(tokens.size()!=3, "Line " << i << " in " << fileName << " has wrong number of tokens.");
- unsigned id = std::atoll( tokens[0].c_str() );
+ unsigned id = atoll( tokens[0].c_str() );
const Factor* factor = factorCollection.AddFactor(tokens[1],false); // TODO: can we assume that the vocabulary is know and filter the model on loading?
bool stored = Store(factor, id);
UTIL_THROW_IF2(!stored, "Line " << i << " in " << fileName << " overwrites existing vocabulary entry.");
@@ -105,8 +105,8 @@ void Model1LexicalTable::Load(const std::string &fileName, const Model1Vocabular
++i;
std::vector<std::string> tokens = Tokenize(line);
UTIL_THROW_IF2(tokens.size()!=3, "Line " << i << " in " << fileName << " has wrong number of tokens.");
- unsigned idS = std::atoll( tokens[0].c_str() );
- unsigned idT = std::atoll( tokens[1].c_str() );
+ unsigned idS = atoll( tokens[0].c_str() );
+ unsigned idT = atoll( tokens[1].c_str() );
const Factor* wordS = vcbS.GetWord(idS);
const Factor* wordT = vcbT.GetWord(idT);
float prob = std::atof( tokens[2].c_str() );
diff --git a/phrase-extract/consolidate-main.cpp b/phrase-extract/consolidate-main.cpp
index c9496f988..0f276144b 100644
--- a/phrase-extract/consolidate-main.cpp
+++ b/phrase-extract/consolidate-main.cpp
@@ -165,7 +165,7 @@ int main(int argc, char* argv[])
}
pos = single_setting.find(":");
UTIL_THROW_IF2(pos == std::string::npos, "faulty MinScore setting '" << single_setting << "' in '" << argv[i] << "'");
- unsigned int field = std::atoll( single_setting.substr(0,pos).c_str() );
+ unsigned int field = atoll( single_setting.substr(0,pos).c_str() );
float threshold = std::atof( single_setting.substr(pos+1).c_str() );
if (field == 0) {
minScore0 = threshold;