Package com.googlecode.clearnlp.morphology

Examples of com.googlecode.clearnlp.morphology.AbstractMPAnalyzer


   * Lemmatize word using ClearNLP lemmatizer.
   */
  public static String lemmatize(String word, String pos) throws IOException {
   
    final String ENG_LEMMATIZER_DATA_FILE = "org/apache/ctakes/dependency/parser/models/lemmatizer/dictionary-1.3.1.jar";
    AbstractMPAnalyzer lemmatizer;
    InputStream lemmatizerModel = FileLocator.getAsStream(ENG_LEMMATIZER_DATA_FILE);
    lemmatizer = EngineGetter.getMPAnalyzer(AbstractReader.LANG_EN, lemmatizerModel);
    String lemma = lemmatizer.getLemma(word, pos);
    lemmatizerModel.close();

    return lemma;
  }
View Full Code Here

TOP

Related Classes of com.googlecode.clearnlp.morphology.AbstractMPAnalyzer

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.