mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-10-26 19:37:58 +03:00
only 1 span length feature, with 1 name
This commit is contained in:
parent
0fcc6fa2bb
commit
bdb1460979
@ -433,10 +433,10 @@ void IOWrapper::OutputNBestList(const ChartTrellisPathList &nBestList, const Cha
|
||||
const SpanLengthFeature *spl = StaticData::Instance().GetSpanLengthFeature();
|
||||
if(spl != NULL)
|
||||
{
|
||||
out << " " << spl->GetScoreProducerWeightShortName(0) << ":";
|
||||
std::vector<float> scores = path.GetScoreBreakdown().GetScoresForProducer(spl);
|
||||
for (size_t i = 0; i < scores.size(); ++i) {
|
||||
out << " " << spl->GetScoreProducerWeightShortName(unsigned(i)) << ": ";
|
||||
out << scores[i];
|
||||
out << " " << scores[i];
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,19 +23,12 @@ size_t SpanLengthFeature::GetNumScoreComponents() const
|
||||
|
||||
std::string SpanLengthFeature::GetScoreProducerDescription(unsigned id) const
|
||||
{
|
||||
CHECK(id < 2);
|
||||
if (id == 0)
|
||||
return "SpanLengthSource";
|
||||
else
|
||||
return "SpanLengthTarget";
|
||||
return "SpanLength";
|
||||
}
|
||||
|
||||
std::string SpanLengthFeature::GetScoreProducerWeightShortName(unsigned id) const
|
||||
{
|
||||
if (id == 0)
|
||||
return "SLS";
|
||||
else
|
||||
return "SLT";
|
||||
return "SL";
|
||||
}
|
||||
|
||||
size_t SpanLengthFeature::GetNumInputScores() const {
|
||||
|
Loading…
Reference in New Issue
Block a user