diff options
Diffstat (limited to 'mteval/ns_wer.h')
-rw-r--r-- | mteval/ns_wer.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mteval/ns_wer.h b/mteval/ns_wer.h new file mode 100644 index 00000000..24c85d83 --- /dev/null +++ b/mteval/ns_wer.h @@ -0,0 +1,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 |