diff options
author | Michael Denkowski <mdenkows@cs.cmu.edu> | 2013-08-19 08:24:48 -0700 |
---|---|---|
committer | Michael Denkowski <mdenkows@cs.cmu.edu> | 2013-08-19 08:24:48 -0700 |
commit | cd666f441d91109d402e4f3993a9ec3c45306dd0 (patch) | |
tree | 3ef5083b5a52929b89ed18730104aace4934faf6 /training/dtrain/score.h | |
parent | ac469cdf4c70154a1c2cedce9edf5cdc3bdb2d61 (diff) | |
parent | 951e7daa9539ffe640f9421897c374f786af53e7 (diff) |
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'training/dtrain/score.h')
-rw-r--r-- | training/dtrain/score.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/training/dtrain/score.h b/training/dtrain/score.h index bddaa071..53e970ba 100644 --- a/training/dtrain/score.h +++ b/training/dtrain/score.h @@ -1,9 +1,7 @@ #ifndef _DTRAIN_SCORE_H_ #define _DTRAIN_SCORE_H_ -#include "kbestget.h" - -using namespace std; +#include "dtrain.h" namespace dtrain { @@ -141,36 +139,43 @@ struct BleuScorer : public LocalScorer { score_t Bleu(NgramCounts& counts, const unsigned hyp_len, const unsigned ref_len); score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/); + void Reset() {} }; struct StupidBleuScorer : public LocalScorer { score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/); + void Reset() {} }; struct FixedStupidBleuScorer : public LocalScorer { score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/); + void Reset() {} }; struct SmoothBleuScorer : public LocalScorer { score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/); + void Reset() {} }; struct SumBleuScorer : public LocalScorer { - score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/); + score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/); + void Reset() {} }; struct SumExpBleuScorer : public LocalScorer { - score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/); + score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/); + void Reset() {} }; struct SumWhateverBleuScorer : public LocalScorer { - score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/); + score_t Score(vector<WordID>& hyp, vector<WordID>& ref, const unsigned /*rank*/, const unsigned /*src_len*/); + void Reset() {}; }; struct ApproxBleuScorer : public BleuScorer |