Package opennlp.ccg.perceptron

Examples of opennlp.ccg.perceptron.FeatureMap


  protected void addFeatures(Sign sign, boolean complete) {
    // check for existing map, otherwise make one
    if (getFeatureMap(sign) != null) return;
    // lex case
    if (sign.isLexical()) {
      currentMap = new FeatureMap(0);
    }
    // non-terminal
    else {
      Sign[] inputs = sign.getDerivationHistory().getInputs();
      // first recurse
      for (Sign child : inputs) addFeatures(child, false);
      // use input maps in making current map
      if (inputs.length == 1) {
        currentMap = new FeatureMap(getFeatureMap(inputs[0]));
      }
      else if (inputs.length == 2) {
        currentMap = new FeatureMap(getFeatureMap(inputs[0]), getFeatureMap(inputs[1]));
      }

      String subjArg=null;
     
      //do each newly filled dep
View Full Code Here

TOP

Related Classes of opennlp.ccg.perceptron.FeatureMap

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.