blob: a0afea3b1242074e338f6a18ba1e558c664ac5a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
|