summaryrefslogtreecommitdiff
path: root/training/dtrain/pairsampling.h
diff options
context:
space:
mode:
authorChris Dyer <redpony@gmail.com>2014-01-13 04:44:53 -0800
committerChris Dyer <redpony@gmail.com>2014-01-13 04:44:53 -0800
commit7a9c1c85fecb787b1ee4b8e9552ed35a635e3c39 (patch)
treea47a7ad4e51fb95a3c98f657b0b82a3e9660c966 /training/dtrain/pairsampling.h
parenta1cf0d10fe44ede32d29be37107884b734d459ae (diff)
parent757ffb75e9a860ccd10843dcf099787cefec781a (diff)
Merge pull request #36 from pks/master
RuleWordAlignmentFeatures, minor dtrain changes
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++) {