Package opennlp.tools.ml.maxent

Examples of opennlp.tools.ml.maxent.GIS


  public static EventTrainer getEventTrainer(Map<String, String> trainParams,
      Map<String, String> reportMap) {
    String trainerType = trainParams.get(AbstractTrainer.ALGORITHM_PARAM);
    if (trainerType == null) {
      // default to MAXENT
      AbstractEventTrainer trainer = new GIS();
      trainer.init(trainParams, reportMap);
      return trainer;
    }
    else {
      if (BUILTIN_TRAINERS.containsKey(trainerType)) {
        EventTrainer trainer = TrainerFactory.<EventTrainer> createBuiltinTrainer(
            BUILTIN_TRAINERS.get(trainerType));
        trainer.init(trainParams, reportMap);
        return trainer;
      } else {
        EventTrainer trainer = ExtensionLoader.instantiateExtension(EventTrainer.class, trainerType);
        trainer.init(trainParams, reportMap);
        return trainer;
      }
    }
  }
View Full Code Here

TOP

Related Classes of opennlp.tools.ml.maxent.GIS

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.