summaryrefslogtreecommitdiff
path: root/mteval/aer_scorer.h
diff options
context:
space:
mode:
Diffstat (limited to 'mteval/aer_scorer.h')
-rw-r--r--mteval/aer_scorer.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/mteval/aer_scorer.h b/mteval/aer_scorer.h
new file mode 100644
index 00000000..6d53d359
--- /dev/null
+++ b/mteval/aer_scorer.h
@@ -0,0 +1,23 @@
+#ifndef _AER_SCORER_
+#define _AER_SCORER_
+
+#include <boost/shared_ptr.hpp>
+
+#include "scorer.h"
+#include "array2d.h"
+
+class AERScorer : public SentenceScorer {
+ public:
+ // when constructing alignment strings from a hypergraph, the source
+ // is necessary.
+ AERScorer(const std::vector<std::vector<WordID> >& refs, const std::string& src = "");
+ ScoreP ScoreCandidate(const std::vector<WordID>& hyp) const;
+ ScoreP ScoreCCandidate(const std::vector<WordID>& hyp) const;
+ static ScoreP ScoreFromString(const std::string& in);
+ const std::string* GetSource() const;
+ private:
+ std::string src_;
+ boost::shared_ptr<Array2D<bool> > ref_;
+};
+
+#endif