mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-20 07:42:21 +03:00
null padding
This commit is contained in:
parent
5d633b8381
commit
de7237c9de
@ -10,9 +10,7 @@ BilingualLM_NPLM::BilingualLM_NPLM(const std::string &line)
|
||||
factored(false),
|
||||
neuralLM_cache(1000000) {
|
||||
|
||||
if (!NULL_overwrite) {
|
||||
NULL_string = "<null>"; //Default null value for nplm
|
||||
}
|
||||
NULL_string = "<null>"; //Default null value for nplm
|
||||
FactorCollection& factorFactory = FactorCollection::Instance(); // To add null word.
|
||||
const Factor* NULL_factor = factorFactory.AddFactor(NULL_string);
|
||||
NULL_word.SetFactor(0, NULL_factor);
|
||||
@ -87,6 +85,7 @@ void BilingualLM_NPLM::SetParameter(const std::string& key, const std::string& v
|
||||
neuralLM_cache = atoi(value.c_str());
|
||||
} else if (key == "premultiply") {
|
||||
premultiply = Scan<bool>(value);
|
||||
//TODO: doesn't currently do anything (constructor doesn't know about parameters)
|
||||
} else if (key == "null_word") {
|
||||
NULL_string = value;
|
||||
NULL_overwrite = true;
|
||||
|
Loading…
Reference in New Issue
Block a user