summaryrefslogtreecommitdiff
path: root/mteval/ns_ter.h
blob: 3190fc1bc99e94af708a2fb248e8bc764363f9d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef _NS_TER_H_
#define _NS_TER_H_

#include "ns.h"

class TERMetric : public EvaluationMetric {
  friend class EvaluationMetric;
 protected:
  TERMetric() : EvaluationMetric("TER") {}

 public:
  virtual unsigned SufficientStatisticsVectorSize() const;
  virtual std::string DetailedScore(const SufficientStats& stats) 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