}
private Collection<String> threshedFeatures;
public void applyFeatureCountThreshold(Collection<String> data, int thresh) {
IntCounter c = new IntCounter();
for (String datum : data) {
for (String feat : makeFeatures(datum)) {
c.incrementCount(feat);
}
}
threshedFeatures = c.keysAbove(thresh);
System.err.println((c.size() - threshedFeatures.size()) + " word features removed due to thresholding.");
}