blob: 5feae2dfa61adf2a87341b681de693564df9c50f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#ifndef NS_DOC_SCORER_H_
#define NS_DOC_SCORER_H_
#include <vector>
#include <string>
#include <boost/shared_ptr.hpp>
class EvaluationMetric;
struct SegmentEvaluator;
class DocumentScorer {
public:
~DocumentScorer();
DocumentScorer();
DocumentScorer(const EvaluationMetric* metric,
const std::vector<std::string>& ref_files,
const std::string& src_file = "",
bool verbose=false) {
Init(metric,ref_files,src_file,verbose);
}
DocumentScorer(const EvaluationMetric* metric,
const std::string& src_ref_composite_file);
int size() const { return scorers_.size(); }
const SegmentEvaluator* operator[](size_t i) const { return scorers_[i].get(); }
private:
void Init(const EvaluationMetric* metric,
const std::vector<std::string>& ref_files,
const std::string& src_file = "",
bool verbose=false);
std::vector<boost::shared_ptr<SegmentEvaluator> > scorers_;
};
#endif
|