Package opennlp.tools.ml.model

Examples of opennlp.tools.ml.model.UniformPrior


      int cutoff, int threads) {
    GISTrainer trainer = new GISTrainer(printMessagesWhileTraining);
    trainer.setSmoothing(smoothing);
    trainer.setSmoothingObservation(SMOOTHING_OBSERVATION);
    if (modelPrior == null) {
      modelPrior = new UniformPrior();
    }

    return trainer.trainModel(iterations, indexer, modelPrior, cutoff, threads);
  }
View Full Code Here


   * @param di The data indexer used to compress events in memory.
   * @return The newly trained model, which can be used immediately or saved
   *         to disk using an opennlp.tools.ml.maxent.io.GISModelWriter object.
   */
  public GISModel trainModel(int iterations, DataIndexer di, int cutoff) {
    return trainModel(iterations,di,new UniformPrior(),cutoff,1);
  }
View Full Code Here

   *          The parameter associated with the correction feature.
   */
  public GISModel(Context[] params, String[] predLabels, String[] outcomeNames,
      int correctionConstant, double correctionParam) {
    this(params, predLabels, outcomeNames, correctionConstant, correctionParam,
        new UniformPrior());
  }
View Full Code Here

  @Test
  public void testMaxentOnPrepAttachData2Threads() throws IOException {
    AbstractModel model =
        new GISTrainer(true).trainModel(100,
            new TwoPassDataIndexer(createTrainingStream(), 1),
            new UniformPrior(), 1, 2);

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

TOP

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

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.