mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 22:14:57 +03:00
Merge branch 'weight-new' of github.com:hieuhoang/mosesdecoder into weight-new
This commit is contained in:
commit
7621f732cd
@ -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]);
|
||||
|
@ -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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user