2011-10-06 15:00:48 +04:00
|
|
|
#ifndef __MERGESCORER_H__
|
|
|
|
#define __MERGESCORER_H__
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <set>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2011-11-14 10:15:30 +04:00
|
|
|
|
2011-10-06 15:00:48 +04:00
|
|
|
#include "Scorer.h"
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
2011-11-14 10:15:30 +04:00
|
|
|
class PerScorer;
|
|
|
|
class ScoreStats;
|
2011-10-06 15:00:48 +04:00
|
|
|
|
|
|
|
/**
|
2011-11-12 03:58:23 +04:00
|
|
|
* Merge scoring.
|
|
|
|
*/
|
2011-10-06 15:00:48 +04:00
|
|
|
class MergeScorer: public StatisticsBasedScorer {
|
2011-11-12 04:24:19 +04:00
|
|
|
public:
|
2011-11-12 05:28:08 +04:00
|
|
|
explicit MergeScorer(const string& config = "");
|
|
|
|
~MergeScorer();
|
|
|
|
|
2011-11-12 04:24:19 +04:00
|
|
|
virtual void setReferenceFiles(const vector<string>& referenceFiles);
|
|
|
|
virtual void prepareStats(size_t sid, const string& text, ScoreStats& entry);
|
2012-02-01 16:36:25 +04:00
|
|
|
|
|
|
|
void whoami() const {
|
|
|
|
cerr << "I AM MergeScorer" << endl;
|
2011-11-12 04:24:19 +04:00
|
|
|
}
|
2011-10-06 15:00:48 +04:00
|
|
|
|
2011-11-12 04:24:19 +04:00
|
|
|
protected:
|
|
|
|
friend class PerScorer;
|
2011-11-12 05:40:54 +04:00
|
|
|
virtual float calculateScore(const vector<int>& comps) const;
|
2011-11-12 02:59:50 +04:00
|
|
|
|
2011-11-12 04:24:19 +04:00
|
|
|
private:
|
2011-11-12 05:28:08 +04:00
|
|
|
const int kLENGTH;
|
2011-11-12 02:59:50 +04:00
|
|
|
|
2011-11-12 05:28:08 +04:00
|
|
|
// no copying allowed
|
|
|
|
MergeScorer(const MergeScorer&);
|
|
|
|
MergeScorer& operator=(const MergeScorer&);
|
2011-11-12 02:59:50 +04:00
|
|
|
};
|
2011-10-06 15:00:48 +04:00
|
|
|
|
2011-11-12 02:59:50 +04:00
|
|
|
#endif //__TERSCORER_H
|