mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 05:55:02 +03:00
e7a2483b22
Squashed commit of the following: - Clean up PRO. - Clean up ScoreStats. - Clean up ScoreData. - Clean up ScoreArray. - Remove unnecessary headers. - Clean up ScopedVector. - Clean up Point. - Clean up PerScorer. - Clean up Optimizer. - Clean up MergeScorer. - Clean up InterpolatedScorer. - Clean up FileStream. - Clean up FeatureStats. - Remove inefficient string concatenation. - Clean up FeatureData. - Clean up FeatureArray. - Clean up Data.
41 lines
859 B
C++
41 lines
859 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;
|
|
|
|
const int kMergeScorerLength = 4;
|
|
|
|
/**
|
|
* 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; }
|
|
|
|
protected:
|
|
friend class PerScorer;
|
|
virtual float calculateScore(const vector<int>& comps) const;
|
|
|
|
private:
|
|
// no copying allowed
|
|
MergeScorer(const MergeScorer&);
|
|
MergeScorer& operator=(const MergeScorer&);
|
|
};
|
|
|
|
#endif // MERT_MERGE_SCORER_H_
|