diff options
author | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2012-04-29 14:55:27 +0200 |
---|---|---|
committer | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2012-04-29 14:55:27 +0200 |
commit | 70585a59a738d0148ed2da90252050f4d86f4a22 (patch) | |
tree | c803b3eb3df5ddc90637f8d33ce7e824c6f0b98b /dtrain/score.cc | |
parent | 810f2bc32c796d270ff2209183ce13e69d4b1627 (diff) |
added params, output
Diffstat (limited to 'dtrain/score.cc')
-rw-r--r-- | dtrain/score.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dtrain/score.cc b/dtrain/score.cc index b09d32ba..71d3e5de 100644 --- a/dtrain/score.cc +++ b/dtrain/score.cc @@ -21,7 +21,7 @@ BleuScorer::Bleu(NgramCounts& counts, const unsigned hyp_len, const unsigned ref vector<score_t> v = w_; if (ref_len < N_) { M = ref_len; - for (unsigned i = 0; i < M; i++) v[i] = 1./((score_t)M); + for (unsigned i = 0; i < M; i++) v[i] = 1/((score_t)M); } score_t sum = 0; for (unsigned i = 0; i < M; i++) { @@ -62,7 +62,7 @@ StupidBleuScorer::Score(vector<WordID>& hyp, vector<WordID>& ref, vector<score_t> v = w_; if (ref_len < N_) { M = ref_len; - for (unsigned i = 0; i < M; i++) v[i] = 1./((score_t)M); + for (unsigned i = 0; i < M; i++) v[i] = 1/((score_t)M); } score_t sum = 0, add = 0; for (unsigned i = 0; i < M; i++) { |