Examples of FeatureValue


Examples of org.maltparserx.core.feature.value.FeatureValue

//      throw new LibException("The learner cannot predict the next class, because the feature vector cannot be found. ");
//    }
    final FeatureList featureList = new FeatureList();
    final int size = featureVector.size();
    for (int i = 1; i <= size; i++) {
      final FeatureValue featureValue = featureVector.getFeatureValue(i-1)
      if (featureValue != null && !(excludeNullValues == true && featureValue.isNullValue())) {
        if (!featureValue.isMultiple()) {
          SingleFeatureValue singleFeatureValue = (SingleFeatureValue)featureValue;
          final int index = featureMap.getIndex(i, singleFeatureValue.getIndexCode());
          if (index != -1 && singleFeatureValue.getValue() != 0) {
            featureList.add(index,singleFeatureValue.getValue());
          }
View Full Code Here

Examples of org.maltparserx.core.feature.value.FeatureValue

      throw new LibsvmException("The decision cannot be found");
   
    try {
      instanceOutput.write(decision.getDecisionCode()+"\t");
      for (int i = 0; i < featureVector.size(); i++) {
        FeatureValue featureValue = featureVector.get(i).getFeatureValue();
        if (excludeNullValues == true && featureValue.isNullValue()) {
          instanceOutput.write("-1");
        } else {
          if (featureValue instanceof SingleFeatureValue) {
            instanceOutput.write(((SingleFeatureValue)featureValue).getIndexCode()+"");
          } else if (featureValue instanceof MultipleFeatureValue) {
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.