From 24e0ff67a5e63ff987755ef128d2b056fbdcd603 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Wed, 10 Sep 2014 23:04:51 -0400 Subject: fix bug when there are too few features --- utils/weights.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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& w) { vector 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::iterator mid = fnums.begin(); mid += nf; -- cgit v1.2.3