Search in sources :

Example 1 with Lemma

use of org.ioperm.morphology.el.Lemma in project languagetool by languagetool-org.

the class GreekTagger method additionalTags.

@Override
protected List<AnalyzedToken> additionalTags(String word, WordTagger wordTagger) {
    List<AnalyzedToken> tokens = new ArrayList<>();
    List<Lemma> lemma = tagger.getLemma(word, false);
    for (Lemma lm : lemma) {
        AnalyzedToken tk = new AnalyzedToken(word, lm.getTag(), lm.getLemma());
        tokens.add(tk);
    }
    return tokens;
}
Also used : AnalyzedToken(org.languagetool.AnalyzedToken) Lemma(org.ioperm.morphology.el.Lemma) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 Lemma (org.ioperm.morphology.el.Lemma)1 AnalyzedToken (org.languagetool.AnalyzedToken)1