From d9f77a14d4e217dc8984871802bbccc66a2c9864 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Sat, 16 Feb 2013 03:18:42 -0500 Subject: new metric --- mteval/ns_ssk.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 mteval/ns_ssk.h (limited to 'mteval/ns_ssk.h') 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& hyp, + const std::vector >& refs, + SufficientStats* out) const; + virtual float ComputeScore(const SufficientStats& stats) const; +}; + +#endif -- cgit v1.2.3