blob: a5757258a827566b4706200644791e3cd96a3807 (
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
|
#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);
}
void Init(const EvaluationMetric* metric,
const std::vector<std::string>& ref_files,
const std::string& src_file = "",
bool verbose=false);
int size() const { return scorers_.size(); }
const SegmentEvaluator* operator[](size_t i) const { return scorers_[i].get(); }
private:
std::vector<boost::shared_ptr<SegmentEvaluator> > scorers_;
};
#endif
|