summaryrefslogtreecommitdiff
path: root/mteval/aer_scorer.h
blob: cd1238f37a0ed28250ad3360ad3170cb336e7045 (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