Package edu.stanford.nlp.stats

Examples of edu.stanford.nlp.stats.IntCounter.incrementCount()


  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.");
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.