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