summaryrefslogtreecommitdiff
path: root/mteval/ns_ssk.h
blob: fdace6eb4f14e9da743d7f6e502c0061851a68d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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