mosesdecoder/mert/TerScorer.h
Tetsuo Kiso 4e3dd11f53 Remove virtual keyword from whoami() function.
The funtion is neither inherited from Scorer nor
StatisticsBasedScorer.
2012-02-01 21:36:25 +09:00

58 lines
1.2 KiB
C++

#ifndef __TERSCORER_H__
#define __TERSCORER_H__
#include <iostream>
#include <set>
#include <string>
#include <vector>
#include "Types.h"
#include "Scorer.h"
using namespace std;
class ScoreStats;
/**
* TER scoring
*/
class TerScorer: public StatisticsBasedScorer
{
public:
explicit TerScorer(const string& config = "");
~TerScorer();
virtual void setReferenceFiles(const vector<string>& referenceFiles);
virtual void prepareStats(size_t sid, const string& text, ScoreStats& entry);
virtual size_t NumberOfScores() const {
// cerr << "TerScorer: " << (LENGTH + 1) << endl;
return kLENGTH + 1;
}
virtual float calculateScore(const vector<int>& comps) const;
void whoami() const {
cerr << "I AM TerScorer" << std::endl;
}
private:
const int kLENGTH;
string m_java_env;
string m_ter_com_env;
// data extracted from reference files
vector<size_t> m_ref_lengths;
vector<multiset<int> > m_ref_tokens;
vector<vector<int> > m_references;
vector<vector<vector<int> > > m_multi_references;
string m_pid;
// no copying allowed
TerScorer(const TerScorer&);
TerScorer& operator=(const TerScorer&);
};
#endif // __TERSCORER_H__