Package opennlp.model

Examples of opennlp.model.FileEventStream


    } finally {
      rvfes1.close();
    }

    GISModel repeatModel;
    FileEventStream rvfes2 = new FileEventStream("src/test/resources/data/opennlp/maxent/repeat-weighting-training-data.txt");
    try {
      repeatModel = GIS.trainModel(100,new OnePassRealValueDataIndexer(rvfes2,1));
    } finally {
      rvfes2.close();
    }

    String[] features2Classify = new String[] {"feature2","feature5"};
    double[] realResults = realModel.eval(features2Classify);
    double[] repeatResults = repeatModel.eval(features2Classify);
View Full Code Here


  public void testRealValuedWeightsVsRepeatWeighting() throws IOException {
    RealValueFileEventStream rvfes1 = new RealValueFileEventStream("src/test/resources/data/opennlp/maxent/real-valued-weights-training-data.txt");
    GISModel realModel = GIS.trainModel(100,new OnePassRealValueDataIndexer(rvfes1,1));

    FileEventStream rvfes2 = new FileEventStream("src/test/resources/data/opennlp/maxent/repeat-weighting-training-data.txt");
    GISModel repeatModel = GIS.trainModel(100,new OnePassRealValueDataIndexer(rvfes2,1));

    String[] features2Classify = new String[] {"feature2","feature5"};
    double[] realResults = realModel.eval(features2Classify);
    double[] repeatResults = repeatModel.eval(features2Classify);
View Full Code Here

TOP

Related Classes of opennlp.model.FileEventStream

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.