summaryrefslogtreecommitdiff
path: root/vest/aer_scorer.h
blob: d0df35d5b2b68fe9e8b9f850ed1d5e7b57e54781 (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 = "");
  Score* ScoreCandidate(const std::vector<WordID>& hyp) const;
  Score* ScoreCCandidate(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