Package opennlp.ccg.parse.postagger.ml

Examples of opennlp.ccg.parse.postagger.ml.POSPriorModel


            Map<String, String> opts = ConfigFileProcessor.readInConfig(configFile, pathKeys);
            if (opts.get("taggertype").equalsIgnoreCase("dummy")) {
                return new DummyPOSTagger();
            }
            MaxentModel mem = new ZLMEM(new File(opts.get("maxentmodel")));
            POSPriorModel posPrior = null;
      if (opts.get("priormodel") != null) {
    posPrior = new POSPriorModel(opts.get("priormodel"), opts.get("priormodelvocab"));
      }
            POSTagFex fexer = new POSTagFex(posPrior);

            res = new BasicPOSTagger(mem, fexer, opts.get("sequencemodel"));
            res.setBeta(Double.parseDouble(opts.get("beta")));
View Full Code Here


      }
    }
  }
  public void loadPriorModel(File priorModelFile, File vocabFile) {
    try {
      priorModel = new POSPriorModel(priorModelFile.getAbsolutePath(), vocabFile.getAbsolutePath());
    } catch (IOException e) {
      System.err.println("Unable to load prior model or vocab file");
      e.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of opennlp.ccg.parse.postagger.ml.POSPriorModel

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.