rename multimodel weights in moses server (harmonization with the new config format)

This commit is contained in:
Rico Sennrich 2013-07-30 17:02:34 +02:00
parent 29cde2a204
commit a15bc05a33
2 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ def translate(input_object, server, weights=None):
params = {}
params['text'] = line
if weights:
params['weight-t-multimodel'] = weights
params['lambda'] = weights
print server.translate(params)
@ -65,7 +65,7 @@ def translate_single_line(args):
params = {}
params['text'] = line
if weights:
params['weight-t-multimodel'] = weights
params['lambda'] = weights
return server.translate(params)['text']

View File

@ -228,7 +228,7 @@ public:
bool nbest_distinct = (si != params.end());
vector<float> multiModelWeights;
si = params.find("weight-t-multimodel");
si = params.find("lambda");
if (si != params.end()) {
xmlrpc_c::value_array multiModelArray = xmlrpc_c::value_array(si->second);
vector<xmlrpc_c::value> multiModelValueVector(multiModelArray.vectorValueValue());