Package opennlp.tools.postag

Examples of opennlp.tools.postag.POSDictionary


      if (tagDictionaryPath != null && !tagDictionaryPath.trim().equals("")) {
        File tagDictFile = FileLocator.locateFile(tagDictionaryPath);
        String tagDictFileAbsPath = tagDictFile.getAbsolutePath();
        logger.info("POS tagger tag-dictionary: " + tagDictFileAbsPath);

        tagDictionary = new POSDictionary(tagDictFileAbsPath, caseSensitive);
      } else {
        logger.info("No POS tagger tag-dictionary.");
      }

      FileInputStream fis = new FileInputStream(posModelFile);
View Full Code Here


   
    POSModel model;
    try {
     
      // TODO: Move to util method ...
      POSDictionary tagdict = null;
      if (parameters.getDictionaryPath() != null) {
        tagdict = new POSDictionary(parameters.getDictionaryPath());
      }
     
      // depending on model and sequence choose training method
      model = opennlp.tools.postag.POSTaggerME.train(parameters.getLanguage(),
           sampleStream, parameters.getModel(), tagdict, null, parameters.getCutoff(), parameters.getNumberOfIterations());
View Full Code Here

TOP

Related Classes of opennlp.tools.postag.POSDictionary

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.