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:
Lane Schwartz 2017-01-02 12:52:01 -06:00
parent 05006bf1e2
commit 999d6b6371

View File

@ -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));
}
}