Package opennlp.tools.ml.model

Examples of opennlp.tools.ml.model.MaxentModel


   
    Map<String, String> trainParams = new HashMap<String, String>();
    trainParams.put(AbstractTrainer.ALGORITHM_PARAM, QNTrainer.MAXENT_QN_VALUE);
    trainParams.put("Threads", Integer.toString(2));
   
    MaxentModel model = TrainerFactory.getEventTrainer(trainParams, null)
                                      .train(createTrainingStream());
   
    testModel(model, 0.8115870264917059);
  }
View Full Code Here


    trainParams.put(AbstractTrainer.ALGORITHM_PARAM, GIS.MAXENT_VALUE);
    trainParams.put(AbstractEventTrainer.DATA_INDEXER_PARAM,
        AbstractEventTrainer.DATA_INDEXER_TWO_PASS_VALUE);
    trainParams.put(AbstractTrainer.CUTOFF_PARAM, Integer.toString(1));

    MaxentModel model = TrainUtil.train(createTrainingStream(), trainParams, null);

    testModel(model, 0.7997028967566229);
  }
View Full Code Here

  public void testMaxentOnPrepAttachDataWithParamsDefault() throws IOException {

    Map<String, String> trainParams = new HashMap<String, String>();
    trainParams.put(AbstractTrainer.ALGORITHM_PARAM, GIS.MAXENT_VALUE);

    MaxentModel model = TrainUtil.train(createTrainingStream(), trainParams, null);

    testModel(model, 0.8086159940579352 );
  }
View Full Code Here

TOP

Related Classes of opennlp.tools.ml.model.MaxentModel

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.