00001 // 00002 // SentenceLevelScorer.h 00003 // mert_lib 00004 // 00005 // Created by Hieu Hoang on 22/06/2012. 00006 // Copyright 2012 __MyCompanyName__. All rights reserved. 00007 // 00008 00009 #ifndef mert_lib_SentenceLevelScorer_h 00010 #define mert_lib_SentenceLevelScorer_h 00011 00012 #include "Scorer.h" 00013 #include <string> 00014 #include <vector> 00015 00016 namespace MosesTuning 00017 { 00018 00022 class SentenceLevelScorer : public Scorer 00023 { 00024 public: 00025 SentenceLevelScorer(const std::string& name, const std::string& config); 00026 ~SentenceLevelScorer(); 00027 00030 virtual void score(const candidates_t& candidates, const diffs_t& diffs, 00031 statscores_t& scores); 00032 00033 // calculate the actual score * 00034 virtual statscore_t calculateScore(const std::vector<statscore_t>& totals) const { 00035 return 0; 00036 } 00037 00038 protected: 00039 // Set up regularisation parameters. 00040 void Init(); 00041 00042 //regularisation 00043 ScorerRegularisationStrategy m_regularisationStrategy; 00044 size_t m_regularisationWindow; 00045 }; 00046 00047 } 00048 #endif