Merge branch 'weight-new' of github.com:hieuhoang/mosesdecoder into weight-new

This commit is contained in:
Hieu Hoang 2013-03-24 09:57:45 +00:00
commit 7621f732cd
2 changed files with 5 additions and 5 deletions

View File

@ -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<string> toks = Tokenize(line);
for (size_t i = 1; i < toks.size(); ++i) {
vector<string> args = Tokenize(toks[i], "=");
CHECK(args.size() == 2);
for (size_t i = 0; i < m_args.size(); ++i) {
const vector<string> &args = m_args[i];
if (args[0] == "factor") {
factorType = Scan<FactorType>(args[1]);

View File

@ -354,6 +354,9 @@ LanguageModel *ConstructKenLM(const std::string &description, const std::string
else if (args[0] == "lazyken") {
lazy = Scan<bool>(args[1]);
}
else if (args[0] == "name") {
// that's ok. do nothing, passes onto LM constructor
}
else {
throw "Unknown argument " + args[0];
}