Example #1
0
 /// <summary>
 /// Create a new
 /// <c>WordLemmaTag</c>
 /// from a Label.  The value of
 /// the Label corresponds to the word of the WordLemmaTag.
 /// </summary>
 /// <param name="word">This word is passed to the supertype constructor</param>
 /// <param name="tag">
 /// The
 /// <c>value()</c>
 /// of this Label is set as the
 /// tag of this Label
 /// </param>
 public WordLemmaTag(ILabel word, ILabel tag)
     : this(word)
 {
     WordTag wT = new WordTag(word, tag);
     this.lemma = Morphology.StemStatic(wT).Word();
     SetTag(tag.Value());
 }
Example #2
0
        /// <summary>
        /// Create a new
        /// <c>WordLemmaTag</c>
        /// .
        /// </summary>
        /// <param name="word">This word is set as the word of this Label</param>
        /// <param name="tag">
        /// The
        /// <c>value()</c>
        /// of this Label is set as the
        /// tag of this Label
        /// </param>
        public WordLemmaTag(string word, string tag)
        {
            WordTag wT = new WordTag(word, tag);

            this.word  = word;
            this.lemma = Morphology.StemStatic(wT).Word();
            SetTag(tag);
        }
        public virtual void TestWordTag()
        {
            string  val = "fowl";
            WordTag sl  = new WordTag(val);

            InternalValidation("WordTag", sl, val);
            string tag = "NN";

            sl = new WordTag(val, tag);
            InternalValidation("WordTag", sl, val);
            ValidateHasTag("WordTag", sl, tag);
            WordTag wt2 = new WordTag(sl);

            InternalValidation("WordTag", wt2, val);
            ValidateHasTag("WordTag", wt2, tag);
        }