diff options
Diffstat (limited to 'mteval/wer.h')
-rw-r--r-- | mteval/wer.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mteval/wer.h b/mteval/wer.h new file mode 100644 index 00000000..3a799f58 --- /dev/null +++ b/mteval/wer.h @@ -0,0 +1,16 @@ +#ifndef WER_H_ +#define WER_H_ + +#include "scorer.h" + +class WERScorer : public SentenceScorer { + public: + WERScorer(const std::vector<std::vector<WordID> >& references); + ~WERScorer(); + ScoreP ScoreCandidate(const std::vector<WordID>& hyp) const; + ScoreP ScoreCCandidate(const std::vector<WordID>& hyp) const; + static ScoreP ScoreFromString(const std::string& data); + float Calculate(const std::vector<WordID>& hyp, const Sentence& ref, int& edits, int& char_count) const; +}; + +#endif |