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:
authorXapaJIaMnu <nheart@gmail.com>2015-06-23 17:02:15 +0300
committerXapaJIaMnu <nheart@gmail.com>2015-06-23 17:02:15 +0300
commit69c1308f01b0a0b51fb2ee1c38c04b175f96f631 (patch)
tree4c37d613eeaed66feb602f352c1546a6a9b84359 /moses/ExportInterface.cpp
parentaaf8397d6f11c4039f06b3f6089c402e0cbea54b (diff)
Add context_weights parameter to command line
Diffstat (limited to 'moses/ExportInterface.cpp')
-rw-r--r--moses/ExportInterface.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/moses/ExportInterface.cpp b/moses/ExportInterface.cpp
index c444e98c9..54121609b 100644
--- a/moses/ExportInterface.cpp
+++ b/moses/ExportInterface.cpp
@@ -215,6 +215,9 @@ batch_run()
std::string context_string;
params.SetParameter(context_string,"context-string",string(""));
+ std::string context_weights;
+ params.SetParameter(context_weights,"context-weights",string(""));
+
// main loop over set of input sentences
boost::shared_ptr<InputType> source;
@@ -228,6 +231,12 @@ batch_run()
task->SetContextString(*source->GetContext());
else task->SetContextString(context_string);
+ //if (source->GetContextWeights().isEmpty())
+ // task->SetContextWeights(*source->GetContextWeights());
+ /*else //The context_weights will never be passed to the config file.*/
+ if (context_weights != "") {
+ task->SetContextWeights(context_weights);
+ }
// Allow for (sentence-)context-specific processing prior to
// decoding. This can be used, for example, for context-sensitive
// phrase lookup.