Skip to content

Commit

Permalink
fix bug when there are too few features
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Dyer committed Sep 11, 2014
1 parent c5ffcf5 commit 604b446
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/weights.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 604b446

Please sign in to comment.