Package edu.stanford.nlp.stats

Examples of edu.stanford.nlp.stats.IntCounter$NaturalComparator


    this(trees, 2);
  }
  */

  public ChineseWordFeatureExtractor(int featureLevel) {
    wordCounter = new IntCounter();
    setFeatureLevel(featureLevel);
  }
View Full Code Here


  }

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

  private Map<Object, String> varsToStrings;
  private IntCounter numVarsSet;

  public VariableStrings() {
    varsToStrings = new HashMap<Object,String>();
    numVarsSet = new IntCounter();
  }
View Full Code Here

TOP

Related Classes of edu.stanford.nlp.stats.IntCounter$NaturalComparator

Copyright © 2018 www.massapicom. 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.