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)); }
/// <summary> /// Lemmatize returning a /// <c>WordLemmaTag</c> /// . /// </summary> public virtual WordLemmaTag Lemmatize(WordTag wT) { string tag = wT.Tag(); string word = wT.Word(); string lemma = Lemma(word, tag); return(new WordLemmaTag(word, lemma, tag)); }
public virtual object Apply(object @in) { if (@in is WordTag) { WordTag wt = (WordTag)@in; string tag = wt.Tag(); return(new WordTag(Lemmatize(wt.Word(), tag, lexer, lexer.Option(1)), tag)); } if (@in is Word) { return(Stem((Word)@in)); } return(@in); }
/// <summary>Return a new WordTag which has the lemma as the value of word().</summary> /// <remarks> /// Return a new WordTag which has the lemma as the value of word(). /// The default is to lowercase non-proper-nouns, unless options have /// been set. /// </remarks> public static WordTag StemStatic(WordTag wT) { return(StemStatic(wT.Word(), wT.Tag())); }