diff options
author | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-11 02:37:10 +0000 |
---|---|---|
committer | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-11 02:37:10 +0000 |
commit | 80686d4e567bae579ea39e009826a2de92cd4ace (patch) | |
tree | c3c35fcba57dde423a248f38aa121ad197c79734 /mteval/aer_scorer.h | |
parent | 3c85c407c333899f6b4bc26632d312b8e568b638 (diff) |
major refactor, break bad circular deps
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@509 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'mteval/aer_scorer.h')
-rw-r--r-- | mteval/aer_scorer.h | 23 |
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 |