Package edu.stanford.nlp.ling

Examples of edu.stanford.nlp.ling.WordLemmaTag


    public List<WordLemmaTag> getStanfordWordLemmaTags() {
        List<AgigaToken> tokens = getTokens();
        List<WordLemmaTag> labels = new ArrayList<WordLemmaTag>();
        for (int i = 0; i < tokens.size(); i++) {
            AgigaToken at = tokens.get(i);
            WordLemmaTag curToken;
            require(prefs.readWord, "AgigaPrefs.readWord must be true for getStanfordWordLemmaTags()");
            if (prefs.readWord && prefs.readLemma && prefs.readPos) {
                curToken = new WordLemmaTag(at.getWord(), at.getLemma(), at.getPosTag());
            } else if (prefs.readWord && prefs.readPos) {
                curToken = new WordLemmaTag(at.getWord(), at.getPosTag());
            } else { // if (prefs.readWord) {
                curToken = new WordLemmaTag(at.getWord());
            }
            labels.add(curToken);
        }
        return labels;
    }
View Full Code Here


   */
  public WordLemmaTag lemmatize(WordTag wT) {
    String tag = wT.tag();
    String word = wT.word();
    String lemma = lemma(word, tag);
    return new WordLemmaTag(word, lemma, tag);
  }
View Full Code Here

  public static WordLemmaTag lemmatizeStatic(WordTag wT) {
    String tag = wT.tag();
    String word = wT.word();
    String lemma = stemStatic(wT).word();
    return new WordLemmaTag(word, lemma, tag);
  }
View Full Code Here

   */
  public WordLemmaTag lemmatize(WordTag wT) {
    String tag = wT.tag();
    String word = wT.word();
    String lemma = stem(wT).word();
    return new WordLemmaTag(word, lemma, tag);
  }
View Full Code Here

  public static WordLemmaTag lemmatizeStatic(WordTag wT) {
    String tag = wT.tag();
    String word = wT.word();
    String lemma = stemStatic(wT).word();
    return new WordLemmaTag(word, lemma, tag);
  }
View Full Code Here

TOP

Related Classes of edu.stanford.nlp.ling.WordLemmaTag

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.