only 1 span length feature, with 1 name

This commit is contained in:
Hieu Hoang 2012-09-07 04:06:34 +01:00
parent 0fcc6fa2bb
commit bdb1460979
2 changed files with 4 additions and 11 deletions

View File

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

View File

@ -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 {