Example #1
0
        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));
        }
Example #2
0
        /// <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));
        }
Example #3
0
 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);
 }
Example #4
0
 /// <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()));
 }