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

#include "ns.h"

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

 public:
  virtual bool IsErrorMetric() const;
  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