Package opennlp.ccg.realize.hypertagger

Examples of opennlp.ccg.realize.hypertagger.TagExtractor


    htVocabFile = options.valueOf(ht_vocab_s);
    if(options.has("q"))
      quiet = true;
    LFLoader lfs = new LFLoader(options.valueOf(gr_s), options.valueOf(corpusDir_s), options.nonOptionArguments());
    if(options.has("pos")) {
      TagExtractor tex = new ZLPOSTagger();
      if(posPriorModelFile != null && posVocabFile != null) {
        debug("Loading POS model priors from " + posPriorModelFile);
        debug("Loading POS model vocab from " + posVocabFile);
        tex.loadPriorModel(posPriorModelFile, posVocabFile);
      }
      debug("Extracting POS features...");
      t = new TagExtract(tex);
    }
    else {
      // extracting hypertags
      // using GS pos tags
      TagExtractor tex = new ZLMaxentHypertagger();
      if(htPriorModelFile != null && htVocabFile != null) {
        debug("Loading HT model priors from " + htPriorModelFile);
        debug("Loading HT model vocab from " + htVocabFile);
        tex.loadPriorModel(htPriorModelFile,htVocabFile);
      }
      if(hyperModelFile != null) {
        debug("Loading proto-HT model from " + hyperModelFile);
        tex.loadProtoModel(hyperModelFile);
      }
      debug("Extracting hypertagger features...");
      t = new TagExtract(tex);
    }
    t.setOutput(output);
View Full Code Here

TOP

Related Classes of opennlp.ccg.realize.hypertagger.TagExtractor

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.