diff options
Diffstat (limited to 'mert/BleuScorer.h')
-rw-r--r-- | mert/BleuScorer.h | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/mert/BleuScorer.h b/mert/BleuScorer.h index f3dd978aa..6f6d40d53 100644 --- a/mert/BleuScorer.h +++ b/mert/BleuScorer.h @@ -34,22 +34,15 @@ public: virtual void prepareStats(size_t sid, const string& text, ScoreStats& entry); size_t NumberOfScores() { - // cerr << "BleuScorer: " << (2 * LENGTH + 1) << endl; return (2 * kLENGTH + 1); } - -//protected: float calculateScore(const vector<int>& comps); private: - // no copying allowed - BleuScorer(const BleuScorer&); - BleuScorer& operator=(const BleuScorer&); - //Used to construct the ngram map struct CompareNgrams { - int operator() (const vector<int>& a, const vector<int>& b) { + int operator()(const vector<int>& a, const vector<int>& b) { size_t i; size_t as = a.size(); size_t bs = b.size(); @@ -70,7 +63,6 @@ private: typedef map<vector<int>,int,CompareNgrams> counts_t; typedef map<vector<int>,int,CompareNgrams>::iterator counts_it; - typedef ScopedVector<counts_t> refcounts_t; /** @@ -78,14 +70,7 @@ private: */ size_t countNgrams(const string& line, counts_t& counts, unsigned int n); - void dump_counts(counts_t& counts) { - for (counts_it i = counts.begin(); i != counts.end(); ++i) { - cerr << "("; - copy(i->first.begin(), i->first.end(), ostream_iterator<int>(cerr," ")); - cerr << ") " << i->second << ", "; - } - cerr << endl; - } + void dump_counts(counts_t& counts); const int kLENGTH; BleuReferenceLengthStrategy _refLengthStrategy; @@ -93,6 +78,10 @@ private: // data extracted from reference files refcounts_t _refcounts; vector<vector<size_t> > _reflengths; + + // no copying allowed + BleuScorer(const BleuScorer&); + BleuScorer& operator=(const BleuScorer&); }; #endif // __BLEUSCORER_H__ |