mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 19:27:11 +03:00
-show-weights: output sparseProducerWeight if != 1, otherwise 'sparse'
This commit is contained in:
parent
76d7595667
commit
85ce6547fd
@ -175,8 +175,12 @@ static void PrintFeatureWeight(const FeatureFunction* ff)
|
||||
<< values[i] << endl;
|
||||
}
|
||||
} else {
|
||||
cout << ff->GetScoreProducerDescription() << " " <<
|
||||
ff->GetScoreProducerWeightShortName() << " sparse" << endl;
|
||||
if (ff->GetSparseProducerWeight() == 1)
|
||||
cout << ff->GetScoreProducerDescription() << " " <<
|
||||
ff->GetScoreProducerWeightShortName() << " sparse" << endl;
|
||||
else
|
||||
cout << ff->GetScoreProducerDescription() << " " <<
|
||||
ff->GetScoreProducerWeightShortName() << " " << ff->GetSparseProducerWeight() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -297,8 +297,12 @@ static void PrintFeatureWeight(const FeatureFunction* ff)
|
||||
<< values[i] << endl;
|
||||
}
|
||||
} else {
|
||||
cout << ff->GetScoreProducerDescription() << " " <<
|
||||
ff->GetScoreProducerWeightShortName() << " sparse" << endl;
|
||||
if (ff->GetSparseProducerWeight() == 1)
|
||||
cout << ff->GetScoreProducerDescription() << " " <<
|
||||
ff->GetScoreProducerWeightShortName() << " sparse" << endl;
|
||||
else
|
||||
cout << ff->GetScoreProducerDescription() << " " <<
|
||||
ff->GetScoreProducerWeightShortName() << " " << ff->GetSparseProducerWeight() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,6 +54,8 @@ public:
|
||||
|
||||
void SetSparseFeatureReporting() { m_reportSparseFeatures = true; }
|
||||
bool GetSparseFeatureReporting() const { return m_reportSparseFeatures; }
|
||||
|
||||
virtual float GetSparseProducerWeight() const { return 1; }
|
||||
};
|
||||
|
||||
|
||||
|
@ -209,7 +209,7 @@ public:
|
||||
size_t GetNumInputScores() const;
|
||||
|
||||
void SetSparseProducerWeight(float weight) { m_sparseProducerWeight = weight; }
|
||||
float GetSparseProducerWeight() { return m_sparseProducerWeight; }
|
||||
float GetSparseProducerWeight() const { return m_sparseProducerWeight; }
|
||||
|
||||
virtual const FFState* EmptyHypothesisState(const InputType &input) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user