Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Sennrich <rico.sennrich@gmx.ch>2014-09-16 19:36:45 +0400
committerRico Sennrich <rico.sennrich@gmx.ch>2014-09-22 13:49:20 +0400
commit6810b225ccd673c7684ab9b62e0daa0a7af054f3 (patch)
tree570de70e3e57af2bc13782c09e222599c7b26e5d /mert/SemposOverlapping.h
parentf40bb2c53c2dcd832bde9e987c921171e2d1e581 (diff)
calculateScore with float (for smoothing support)
Diffstat (limited to 'mert/SemposOverlapping.h')
-rw-r--r--mert/SemposOverlapping.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/mert/SemposOverlapping.h b/mert/SemposOverlapping.h
index 5eddbaef3..88409f77a 100644
--- a/mert/SemposOverlapping.h
+++ b/mert/SemposOverlapping.h
@@ -7,6 +7,8 @@
#include <utility>
#include <vector>
+#include "Types.h"
+
namespace MosesTuning
{
@@ -31,8 +33,8 @@ class SemposOverlapping
{
public:
virtual ~SemposOverlapping() {}
- virtual std::vector<int> prepareStats(const sentence_t& cand, const sentence_t& ref) = 0;
- virtual float calculateScore(const std::vector<int>& stats) const = 0;
+ virtual std::vector<ScoreStatsType> prepareStats(const sentence_t& cand, const sentence_t& ref) = 0;
+ virtual float calculateScore(const std::vector<ScoreStatsType>& stats) const = 0;
virtual std::size_t NumberOfScores() const = 0;
};
@@ -61,8 +63,8 @@ public:
CapMicroOverlapping(const SemposScorer* sempos) : semposScorer(sempos) {}
~CapMicroOverlapping() {}
- virtual std::vector<int> prepareStats(const sentence_t& cand, const sentence_t& ref);
- virtual float calculateScore(const std::vector<int>& stats) const;
+ virtual std::vector<ScoreStatsType> prepareStats(const sentence_t& cand, const sentence_t& ref);
+ virtual float calculateScore(const std::vector<ScoreStatsType>& stats) const;
virtual std::size_t NumberOfScores() const {
return 2;
}
@@ -83,8 +85,8 @@ public:
CapMacroOverlapping(const SemposScorer* sempos) : semposScorer(sempos) {}
~CapMacroOverlapping() {}
- virtual std::vector<int> prepareStats(const sentence_t& cand, const sentence_t& ref);
- virtual float calculateScore(const std::vector<int>& stats) const;
+ virtual std::vector<ScoreStatsType> prepareStats(const sentence_t& cand, const sentence_t& ref);
+ virtual float calculateScore(const std::vector<ScoreStatsType>& stats) const;
virtual std::size_t NumberOfScores() const {
return kMaxNOC * 2;
}