diff --git a/moses/LM/IRST.cpp b/moses/LM/IRST.cpp index 9038abd2b..ba2537eea 100644 --- a/moses/LM/IRST.cpp +++ b/moses/LM/IRST.cpp @@ -42,15 +42,12 @@ namespace Moses LanguageModelIRST::LanguageModelIRST(const std::string &line) :LanguageModelSingleFactor("IRSTLM", line) { - cerr << "line=" << line << endl; FactorType factorType; size_t nGramOrder; string filePath; - vector toks = Tokenize(line); - for (size_t i = 1; i < toks.size(); ++i) { - vector args = Tokenize(toks[i], "="); - CHECK(args.size() == 2); + for (size_t i = 0; i < m_args.size(); ++i) { + const vector &args = m_args[i]; if (args[0] == "factor") { factorType = Scan(args[1]); diff --git a/moses/LM/Ken.cpp b/moses/LM/Ken.cpp index d4babd3a1..6e0c63f53 100644 --- a/moses/LM/Ken.cpp +++ b/moses/LM/Ken.cpp @@ -354,6 +354,9 @@ LanguageModel *ConstructKenLM(const std::string &description, const std::string else if (args[0] == "lazyken") { lazy = Scan(args[1]); } + else if (args[0] == "name") { + // that's ok. do nothing, passes onto LM constructor + } else { throw "Unknown argument " + args[0]; }