summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorChris Dyer <cdyer@allegro.clab.cs.cmu.edu>2014-09-10 23:04:51 -0400
committerChris Dyer <cdyer@allegro.clab.cs.cmu.edu>2014-09-10 23:04:51 -0400
commit604b4464e7e3f8b90145c7039d5672e6638c0dd3 (patch)
treec55d2dfdfe5c926c4a0a47d61c276c0e7f96a8c9 /utils
parentc5ffcf5dda7a7f3fa651f5132c44ffc5f07d1da8 (diff)
fix bug when there are too few features
Diffstat (limited to 'utils')
-rw-r--r--utils/weights.cc2
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;