summaryrefslogtreecommitdiff
path: root/training/dtrain/pairsampling.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@allegro.clab.cs.cmu.edu>2014-01-15 23:33:58 -0500
committerChris Dyer <cdyer@allegro.clab.cs.cmu.edu>2014-01-15 23:33:58 -0500
commit4b3c880a77d25af9f612e9aaf60e78faa3f00624 (patch)
tree20b3395f0146fbadf6563e4b9d822184342fdacd /training/dtrain/pairsampling.h
parent9f57df1eb1346196b6ea755eab9fb81a8a57b915 (diff)
parentf3f8dbaec0c91d90fc2e9fdec988081659a7c48c (diff)
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'training/dtrain/pairsampling.h')
-rw-r--r--training/dtrain/pairsampling.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/training/dtrain/pairsampling.h b/training/dtrain/pairsampling.h
index 3f67e209..1a3c498c 100644
--- a/training/dtrain/pairsampling.h
+++ b/training/dtrain/pairsampling.h
@@ -112,6 +112,7 @@ _PRO_cmp_pair_by_diff_d(pair<ScoredHyp,ScoredHyp> a, pair<ScoredHyp,ScoredHyp> b
inline void
PROsampling(vector<ScoredHyp>* s, vector<pair<ScoredHyp,ScoredHyp> >& training, score_t threshold, unsigned max, bool _unused=false, float _also_unused=0)
{
+ sort(s->begin(), s->end(), cmp_hyp_by_score_d);
unsigned max_count = 5000, count = 0, sz = s->size();
bool b = false;
for (unsigned i = 0; i < sz-1; i++) {