explicitly declare how many scores there are in language model features

This commit is contained in:
Hieu Hoang 2013-06-04 21:49:37 +01:00
parent 4232188fe4
commit 7f1a6041ba
2 changed files with 3 additions and 4 deletions

View File

@ -372,8 +372,6 @@ LanguageModel *ConstructKenLM(const std::string &description, const std::string
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];
}
}

View File

@ -683,8 +683,9 @@ void Parameter::ConvertWeightArgsLM()
SetWeight(newFeatureName, ind, weightsLM);
string featureLine = newFeatureName + " "
+ "factor=" + modelToks[1] + " " // factor
+ "order=" + modelToks[2] + " "; // order
+ "factor=" + modelToks[1] + " " // factor
+ "order=" + modelToks[2] + " " // order
+ "num-features=" + SPrint(numFF) + " ";
if (lmType == 9) {
featureLine += "lazyken=1 ";
} else if (lmType == 8) {