diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-02-26 08:04:27 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-02-26 08:04:27 +0400 |
commit | c913effe13f649be1a1453c67eeca0729fc05f60 (patch) | |
tree | e36e8b702213833fc652030761da3cde168e3402 /mert/CderScorer.h | |
parent | c26e83fd098b93c33200c4794e33bf8f4c4ff1b2 (diff) |
Clean up.
Diffstat (limited to 'mert/CderScorer.h')
-rw-r--r-- | mert/CderScorer.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/mert/CderScorer.h b/mert/CderScorer.h index 25d5b6bfb..164362de8 100644 --- a/mert/CderScorer.h +++ b/mert/CderScorer.h @@ -1,8 +1,6 @@ #ifndef MERT_CDER_SCORER_H_ #define MERT_CDER_SCORER_H_ -#include <algorithm> -#include <iostream> #include <string> #include <vector> #include "Types.h" @@ -10,9 +8,8 @@ using namespace std; -class CderScorer: public StatisticsBasedScorer -{ -public: +class CderScorer: public StatisticsBasedScorer { + public: explicit CderScorer(const string& config); ~CderScorer(); @@ -22,17 +19,16 @@ public: virtual void prepareStatsVector(size_t sid, const string& text, vector<int>& stats); - virtual size_t NumberOfScores() const { - return 2; - } + virtual size_t NumberOfScores() const { return 2; } virtual float calculateScore(const vector<int>& comps) const; -private: + private: typedef vector<int> sent_t; vector<vector<sent_t> > m_ref_sentences; - vector<int> computeCD(const sent_t& cand, const sent_t& ref) const; + void computeCD(const sent_t& cand, const sent_t& ref, + vector<int>& stats) const; // no copying allowed CderScorer(const CderScorer&); |