Package opennlp.model

Examples of opennlp.model.ListEventStream


  }
 
  public static EventStream createTrainingStream() throws IOException {
    List<Event> trainingEvents = readPpaFile("training");

    EventStream trainingStream = new ListEventStream(trainingEvents);
   
    return trainingStream;
  }
View Full Code Here


    @Test
    public void testGetConf() throws Exception {
        BooleanFeatureSet<String> features = StringFeatures.featureSet;
        GISModel model = GIS.trainModel(
                new ListEventStream(StringFeatures.dataSet.getInstances()), 100, 0);
        OpenNlpConfFunction<String> conf = new OpenNlpConfFunction<String>(model, features);
        double janeConf = conf.getConf("jane");
        double ofConf = conf.getConf("of");
        System.out.println(ofConf);
        System.out.println(janeConf);
View Full Code Here

    @Test
    public void testGetConf() throws Exception {
        BooleanFeatureSet<String> features = StringFeatures.featureSet;
        GISModel model = GIS.trainModel(
                new ListEventStream(StringFeatures.dataSet.getInstances()), 100, 0);
        OpenNlpConfFunction<String> conf = new OpenNlpConfFunction<String>(model, features);
        double janeConf = conf.getConf("jane");
        double ofConf = conf.getConf("of");
        System.out.println(ofConf);
        System.out.println(janeConf);
View Full Code Here

            dataSet.addInstance(extr, label);
        }
    }

    private void train() throws Exception {
        this.model = GIS.trainModel(new ListEventStream(this.dataSet
                .getInstances()), 100, 0);
    }
View Full Code Here

TOP

Related Classes of opennlp.model.ListEventStream

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.