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 | 604b4464e7e3f8b90145c7039d5672e6638c0dd3 (patch) | |
tree | c55d2dfdfe5c926c4a0a47d61c276c0e7f96a8c9 /utils | |
parent | c5ffcf5dda7a7f3fa651f5132c44ffc5f07d1da8 (diff) |
fix bug when there are too few features
Diffstat (limited to 'utils')
-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; |