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

#include "ns.h"

class WERMetric : public EvaluationMetric {
  friend class EvaluationMetric;
 protected:
  WERMetric() : EvaluationMetric("WER") {}

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