diff options
author | Chris Dyer <cdyer@allegro.clab.cs.cmu.edu> | 2014-09-10 23:04:51 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@allegro.clab.cs.cmu.edu> | 2014-09-10 23:04:51 -0400 |
commit | 24e0ff67a5e63ff987755ef128d2b056fbdcd603 (patch) | |
tree | 1768ff5d697356fa081bb8164a7568dc2ee8a0a1 | |
parent | 0194054c4fe242cafe3c1586c3a1ae96b8fb3e8f (diff) |
fix bug when there are too few features
-rw-r--r-- | utils/weights.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/weights.cc b/utils/weights.cc index 1f66c441..7d5d96d4 100644 --- a/utils/weights.cc +++ b/utils/weights.cc @@ -147,7 +147,7 @@ void Weights::ShowLargestFeatures(const vector<weight_t>& w) { vector<int> fnums(w.size()); for (unsigned i = 0; i < w.size(); ++i) fnums[i] = i; - int nf = FD::NumFeats(); + int nf = w.size(); if (nf > 10) nf = 10; vector<int>::iterator mid = fnums.begin(); mid += nf; |