mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-05 02:22:21 +03:00
Added labelled score breakdown to translation options in TranslationRequest.
This will enable a client to get the feature value(s) associated with a particular feature for a particular translation option
This commit is contained in:
parent
05006bf1e2
commit
999d6b6371
@ -214,6 +214,9 @@ insertTranslationOptions(Moses::Manager& manager,
|
||||
for (size_t j = 0; j < scores.size(); ++j)
|
||||
scoresXml.push_back(xmlrpc_c::value_double(scores[j]));
|
||||
toptXml["scores"] = xmlrpc_c::value_array(scoresXml);
|
||||
ostringstream buf;
|
||||
topt->GetScoreBreakdown().OutputAllFeatureScores(buf, true);
|
||||
toptXml["labelledScores"] = PackScores(topt->GetScoreBreakdown());
|
||||
toptsXml.push_back(xmlrpc_c::value_struct(toptXml));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user