Package opennlp.ccg.parse.tagger.ml

Examples of opennlp.ccg.parse.tagger.ml.MaxentModel


        boolean useWordDictionary = (wDictS != null);
        boolean usePOSDictionary = (pDictS != null);
        POSTagger pTagger = (posConfigS == null) ? null : POSTagger.posTaggerFactory(posConfigS);
        TaggingAlgorithm alg = (opts.get("taggingalgorithm") == null || opts.get("taggingalgorithm").equals("forward-backward")) ?
            TaggingAlgorithm.FORWARDBACKWARD : TaggingAlgorithm.FORWARD;
        MaxentModel mem = new ZLMEM(new File(maxentModS));
        //STTaggerWordDictionary wd,STTaggerPOSDictionary pd,  int K, MaxentModel mo, FeatureExtractor fexer,
        //String tagSequenceModel, Constants.TaggingAlgorithm alg, POSTagger posTagger
        res = (pTagger != null) ?
            new WordAndPOSDictionaryLabellingStrategy(wD, pD, kay, mem, fex, seqModS, alg, pTagger) :
            new WordAndPOSDictionaryLabellingStrategy(wD, pD, kay, mem, fex, seqModS, alg);
View Full Code Here


            String[] pathKeys = { "maxentmodel", "priormodel", "priormodelvocab", "sequencemodel"};
            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);
View Full Code Here

TOP

Related Classes of opennlp.ccg.parse.tagger.ml.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.