diff options
author | Barry Haddow <barry.haddow@gmail.com> | 2012-07-17 16:36:50 +0400 |
---|---|---|
committer | Barry Haddow <barry.haddow@gmail.com> | 2012-07-17 16:36:50 +0400 |
commit | 2b4e61d8261510732ac53eaf48a73e6198b77c2b (patch) | |
tree | feeba83dd2c24530d5e069f0089803d77ebfc9cb /mert/BleuScorer.h | |
parent | f592c222fec19e41fcfb9c059c81de2077b971fe (diff) | |
parent | 6a94f740197ac3eff812dcf5d4bbf658eea02d5d (diff) |
Merge branch 'trunk' into miramerge
Compiles, not tested.
Conflicts:
Jamroot
OnDiskPt/PhraseNode.h
OnDiskPt/TargetPhrase.cpp
OnDiskPt/TargetPhrase.h
OnDiskPt/TargetPhraseCollection.cpp
mert/BleuScorer.cpp
mert/Data.cpp
mert/FeatureData.cpp
moses-chart-cmd/src/Main.cpp
moses/src/AlignmentInfo.h
moses/src/ChartManager.cpp
moses/src/LM/Ken.cpp
moses/src/LM/Ken.h
moses/src/LMList.h
moses/src/LexicalReordering.h
moses/src/PhraseDictionaryTree.h
moses/src/ScoreIndexManager.h
moses/src/StaticData.h
moses/src/TargetPhrase.h
moses/src/Word.cpp
scripts/ems/experiment.meta
scripts/ems/experiment.perl
scripts/training/train-model.perl
Diffstat (limited to 'mert/BleuScorer.h')
-rw-r--r-- | mert/BleuScorer.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mert/BleuScorer.h b/mert/BleuScorer.h index d0da10bac..1927183a9 100644 --- a/mert/BleuScorer.h +++ b/mert/BleuScorer.h @@ -7,13 +7,16 @@ #include "Types.h" #include "ScoreData.h" -#include "Scorer.h" +#include "StatisticsBasedScorer.h" #include "ScopedVector.h" +namespace MosesTuning +{ + const int kBleuNgramOrder = 4; class NgramCounts; -class Reference; +class Reference; using namespace std; @@ -37,7 +40,7 @@ public: virtual void setReferenceFiles(const std::vector<std::string>& referenceFiles); virtual void prepareStats(std::size_t sid, const std::string& text, ScoreStats& entry); - virtual float calculateScore(const std::vector<int>& comps) const; + virtual statscore_t calculateScore(const std::vector<int>& comps) const; virtual std::size_t NumberOfScores() const { return 2 * kBleuNgramOrder + 1; } int CalcReferenceLength(std::size_t sentence_id, std::size_t length); @@ -85,4 +88,6 @@ float sentenceLevelBackgroundBleu(const std::vector<float>& sent, const std::vec */ float unsmoothedBleu(const std::vector<float>& stats); +} + #endif // MERT_BLEU_SCORER_H_ |