Examples of ZLMEM


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

        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

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

              //File mod = options.valueOf(modspec);
              //Integer k = options.valueOf(kspec);
              Double beta = options.valueOf(betaspec);
             
             
              ZLMEM maxentModel;
              String seqMod = options.has("seqModel") ? options.valueOf(seqModel) : null;
              Integer fbWidth = options.has("fbBeamWidth") ? options.valueOf(fbBeam) : 5;
             
              String algStr = options.has("taggingAlgorithm") ? options.valueOf(tagAlgorithm) : "forward-backward";
              Constants.TaggingAlgorithm alg = algStr.equalsIgnoreCase("forward") ?
                  Constants.TaggingAlgorithm.FORWARD :
                  Constants.TaggingAlgorithm.FORWARDBACKWARD;
             
              STTaggerWordDictionary wd = null;
              STTaggerPOSDictionary pd = null;
             
              if(options.has("w")) wd = new XMLWordDictionaryReader(options.valueOf(wdictspec)).read();
              if(options.has("p")) pd = new XMLPOSDictionaryReader(options.valueOf(pdictspec)).read();
             
              WordAndPOSDictionaryLabellingStrategy tagger = new WordAndPOSDictionaryLabellingStrategy(
                      wd,
                      pd,
                      (options.has("K") ? options.valueOf(kspec).intValue() : 20),
                      maxentModel = new ZLMEM(options.valueOf(modspec)),
                      new STFex(stPrior),
                      seqMod,
                      alg);
             
              tagger.setMaxSearchBeam(fbWidth);
View Full Code Here

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

            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
Copyright © 2018 www.massapi.com. 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.