summaryrefslogtreecommitdiff
path: root/dtrain/pairsampling.h
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-04-27 01:54:47 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-04-27 01:54:47 +0200
commit0ac66e310d57f9aea5ddeea900c84df08abfe8c2 (patch)
tree1d428ccbe1c63c90499e09e89d314f74fff11047 /dtrain/pairsampling.h
parent01110e92e7429df7882879e026b28aa9c89c724d (diff)
fix approx. BLEU of (Chiang et al. '08)
Diffstat (limited to 'dtrain/pairsampling.h')
-rw-r--r--dtrain/pairsampling.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/dtrain/pairsampling.h b/dtrain/pairsampling.h
index 66ca1706..56702b86 100644
--- a/dtrain/pairsampling.h
+++ b/dtrain/pairsampling.h
@@ -44,7 +44,7 @@ partXYX(vector<ScoredHyp>* s, vector<pair<ScoredHyp,ScoredHyp> >& training, scor
{
sort(s->begin(), s->end(), _XYX_cmp_hyp_by_score);
unsigned sz = s->size();
- unsigned sep = sz * hi_lo;
+ unsigned sep = round(sz*hi_lo);
for (unsigned i = 0; i < sep; i++) {
for (unsigned j = sep; j < sz; j++) {
if ((*s)[i].rank < (*s)[j].rank) {