summaryrefslogtreecommitdiff
path: root/vest/aer_scorer.h
diff options
context:
space:
mode:
Diffstat (limited to 'vest/aer_scorer.h')
-rw-r--r--vest/aer_scorer.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/vest/aer_scorer.h b/vest/aer_scorer.h
new file mode 100644
index 00000000..a0afea3b
--- /dev/null
+++ b/vest/aer_scorer.h
@@ -0,0 +1,22 @@
+#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 = "");
+ Score* ScoreCandidate(const std::vector<WordID>& hyp) const;
+ static Score* ScoreFromString(const std::string& in);
+ const std::string* GetSource() const;
+ private:
+ std::string src_;
+ boost::shared_ptr<Array2D<bool> > ref_;
+};
+
+#endif