Mira works with BLEU and WER both

This commit is contained in:
Prashant Mathur 2016-11-08 15:49:10 +01:00
parent a31fe2e80c
commit 85dca3a4da
2 changed files with 9 additions and 4 deletions

View File

@ -31,6 +31,10 @@ public:
virtual float calculateScore(const std::vector<ScoreStatsType>& comps) const;
virtual float getReferenceLength(const std::vector<ScoreStatsType>& totals) const{
return totals[1];
}
private:
bool m_allowed_long_jumps;

View File

@ -44,10 +44,11 @@ protected:
*/
virtual statscore_t calculateScore(const std::vector<ScoreStatsType>& totals) const = 0;
virtual float getReferenceLength(const std::vector<ScoreStatsType>& totals) const {
UTIL_THROW(util::Exception, "getReferenceLength not implemented for this scorer type.");
return 0;
}
virtual float getReferenceLength(const std::vector<ScoreStatsType>& totals) const{}
// {
// UTIL_THROW(util::Exception, "getReferenceLength not implemented for this scorer type.");
// return 0;
// }
// regularisation
RegularisationType m_regularization_type;