mosesdecoder/mert/MergeScorer.h
Matous Machacek e8a94a7bd2 Added interpolated scorer
example: to interpolate BLEU and CDER use --sctype=BLEU,CDER
to specify weights use --scconfig=weights:0.3+0.7

This scorer should replace MergeScorer (which requires mert-moses-multi.pl) soon.
Interpolated scorer is more universal and is used in the same way as other scorers.
2012-02-26 18:53:08 +01:00

49 lines
924 B
C++

#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 {
public:
explicit MergeScorer(const string& config = "");
~MergeScorer();
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;
}
protected:
friend class PerScorer;
virtual float calculateScore(const vector<int>& comps) const;
private:
const int kLENGTH;
// no copying allowed
MergeScorer(const MergeScorer&);
MergeScorer& operator=(const MergeScorer&);
};
#endif // MERT_MERGE_SCORER_H_