git-svn-id: http://svn.statmt.org/repository/mira@3927 cc96ff50-19ce-11e0-b349-13d7f0bd23df
This commit is contained in:
pkoehn 2011-08-07 01:57:41 +00:00 committed by Ondrej Bojar
parent 42e10d010b
commit 7c4255c6f7

View File

@ -466,6 +466,12 @@ bool StaticData::LoadData(Parameter *parameter)
if (m_parameter->GetParam("report-sparse-features").size() > 0) {
for(size_t i=0; i<m_parameter->GetParam("report-sparse-features").size(); i++) {
const std::string &name = m_parameter->GetParam("report-sparse-features")[i];
if (m_targetBigramFeature && name.compare(m_targetBigramFeature->GetScoreProducerWeightShortName()) == 0)
m_targetBigramFeature->SetSparseFeatureReporting();
if (m_phrasePairFeature && name.compare(m_phrasePairFeature->GetScoreProducerWeightShortName()) == 0)
m_phrasePairFeature->SetSparseFeatureReporting();
if (m_phraseBoundaryFeature && name.compare(m_phraseBoundaryFeature->GetScoreProducerWeightShortName()) == 0)
m_phraseBoundaryFeature->SetSparseFeatureReporting();
if (m_phraseLengthFeature && name.compare(m_phraseLengthFeature->GetScoreProducerWeightShortName()) == 0)
m_phraseLengthFeature->SetSparseFeatureReporting();
}