diff options
author | Chris Dyer <cdyer@Chriss-MacBook-Air.local> | 2013-02-16 03:18:42 -0500 |
---|---|---|
committer | Chris Dyer <cdyer@Chriss-MacBook-Air.local> | 2013-02-16 03:18:42 -0500 |
commit | 774702f245045ae3752e67b85906a7df4b333cf5 (patch) | |
tree | 96b16185c7048ca03dbaeadec1248a0dceacf313 /mteval/ns_ssk.h | |
parent | bd7c369f225734ed58e51d4aede7c75a66f8c128 (diff) |
new metric
Diffstat (limited to 'mteval/ns_ssk.h')
-rw-r--r-- | mteval/ns_ssk.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mteval/ns_ssk.h b/mteval/ns_ssk.h new file mode 100644 index 00000000..0d418770 --- /dev/null +++ b/mteval/ns_ssk.h @@ -0,0 +1,22 @@ +#ifndef _NS_SSK_H_ +#define _NS_SSK_H_ + +#include "ns.h" + +class SSKMetric : public EvaluationMetric { + friend class EvaluationMetric; + private: + unsigned EditDistance(const std::string& hyp, + const std::string& ref) const; + protected: + SSKMetric() : EvaluationMetric("SSK") {} + + public: + virtual unsigned SufficientStatisticsVectorSize() const; + virtual void ComputeSufficientStatistics(const std::vector<WordID>& hyp, + const std::vector<std::vector<WordID> >& refs, + SufficientStats* out) const; + virtual float ComputeScore(const SufficientStats& stats) const; +}; + +#endif |