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:
authorDavid Madl <git@abanbytes.eu>2015-11-10 18:07:06 +0300
committerDavid Madl <git@abanbytes.eu>2015-11-17 19:15:13 +0300
commite36fb96557d0079e88eef4fc2f38147ff9455b0c (patch)
tree9a58a748cc49d9ad400241d30c14963765180769 /moses/Parameter.cpp
parent3b6393094394cd19eee61b64e467b055a88033d4 (diff)
LanguageModel, KenLM: avoid StaticData usage
* drop global lmodel-oov-feature option, and add it to LM FF config line instead use oov-feature=1 (bool) option instead * drop LanguageModel::GetWeight() * KenLM: use m_verbosity of FF instead of IFVERBOSE macro which uses StaticData * train-model.perl: move language model OOV feature onto LM feature spec line
Diffstat (limited to 'moses/Parameter.cpp')
-rw-r--r--moses/Parameter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/moses/Parameter.cpp b/moses/Parameter.cpp
index 8d634ee39..e06828515 100644
--- a/moses/Parameter.cpp
+++ b/moses/Parameter.cpp
@@ -981,6 +981,9 @@ ConvertWeightArgsLM()
featureLine += "lazyken=0 ";
}
+ if(oovWeights.size() > lmIndex)
+ featureLine += "oov-feature=1 ";
+
featureLine += "path=" + modelToks[3]; // file
AddFeature(featureLine);