summaryrefslogtreecommitdiff
path: root/dtrain/score.cc
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-06-13 14:52:23 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-06-13 14:52:23 +0200
commitd80b98fa834698b9aa660249ea439670a45ab64e (patch)
tree4879b167cd54c550bc70b75627dd00be3060e154 /dtrain/score.cc
parente6d3c25191873ca0cf99db8e89702ed91d65277c (diff)
max pairs arg
Diffstat (limited to 'dtrain/score.cc')
-rw-r--r--dtrain/score.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/dtrain/score.cc b/dtrain/score.cc
index 5c356c0f..5bb0bcaa 100644
--- a/dtrain/score.cc
+++ b/dtrain/score.cc
@@ -128,6 +128,7 @@ SmoothSingleBleuScorer::Score(vector<WordID>& hyp, vector<WordID>& ref,
return brevity_penalty(hyp_len, ref_len) * sum;
}
+// TODO single variants!
/*
* approx. bleu
@@ -136,7 +137,8 @@ SmoothSingleBleuScorer::Score(vector<WordID>& hyp, vector<WordID>& ref,
* and Structural Translation Features"
* (Chiang et al. '08)
*
- * NOTE: needs some more code in dtrain.cc
+ * NOTE: Needs some more code in dtrain.cc .
+ * No scaling by src len.
*/
score_t
ApproxBleuScorer::Score(vector<WordID>& hyp, vector<WordID>& ref,
@@ -158,7 +160,7 @@ ApproxBleuScorer::Score(vector<WordID>& hyp, vector<WordID>& ref,
glob_ref_len_ = discount_ * (glob_ref_len_ + ref_len);
glob_src_len_ = discount_ * (glob_src_len_ + src_len);
}
- return (score_t)glob_src_len_ * score;
+ return score;
}
/*