mosesdecoder/mert/MergeScorer.h

49 lines
924 B
C
Raw Normal View History

#ifndef MERT_MERGE_SCORER_H_
#define MERT_MERGE_SCORER_H_
#include <iostream>
#include <set>
#include <string>
#include <vector>
#include "Scorer.h"
using namespace std;
class PerScorer;
class ScoreStats;
/**
* Merge scoring.
*/
class MergeScorer: public StatisticsBasedScorer {
2011-11-12 04:24:19 +04:00
public:
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);
virtual size_t NumberOfScores() const
{
return 0;
}
void whoami() const {
cerr << "I AM MergeScorer" << endl;
2011-11-12 04:24:19 +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 04:24:19 +04:00
private:
const int kLENGTH;
// no copying allowed
MergeScorer(const MergeScorer&);
MergeScorer& operator=(const MergeScorer&);
};
#endif // MERT_MERGE_SCORER_H_