diff options
author | mjdenkowski <michael.j.denkowski@gmail.com> | 2013-08-29 02:27:51 -0400 |
---|---|---|
committer | mjdenkowski <michael.j.denkowski@gmail.com> | 2013-08-29 02:27:51 -0400 |
commit | e078ac74f3499298742174a06f915b58f2d4cbdb (patch) | |
tree | def7762832ed4a7bc6adbb8b1b6515829544604d /mteval/scorer.h | |
parent | 6f462d23384b6e42a944feedaf6f37ae7a5b7921 (diff) |
Cleanup, fix id issue.
Diffstat (limited to 'mteval/scorer.h')
-rw-r--r-- | mteval/scorer.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mteval/scorer.h b/mteval/scorer.h index 56c39a7d..bb1e89ae 100644 --- a/mteval/scorer.h +++ b/mteval/scorer.h @@ -101,16 +101,16 @@ class DocScorer { Init(type,ref_files,src_file,verbose); } - int size() const { return scorers_.size(); } - ScorerP operator[](size_t i) const { return scorers_[i]; } + virtual int size() const { return scorers_.size(); } + virtual ScorerP operator[](size_t i) const { return scorers_[i]; } virtual void update(const std::string& ref) {} private: - ScoreType type; std::vector<ScorerP> scorers_; }; class DocStreamScorer : public DocScorer { public: + ~DocStreamScorer(); void Init(const ScoreType type, const std::vector<std::string>& ref_files, const std::string& src_file = "", @@ -124,9 +124,12 @@ class DocStreamScorer : public DocScorer { { Init(type,ref_files,src_file,verbose); } - ScorerP operator[](size_t i); - int size(); + ScorerP operator[](size_t i) const { return scorer; } + int size() const { return 1; } void update(const std::string& ref); + private: + ScoreType type; + ScorerP scorer; }; #endif |