Exemple #1
0
        public virtual void TestStem()
        {
            NUnit.Framework.Assert.AreEqual("John", Morphology.StemStatic(new WordTag("John", "NNP")).Word());
            NUnit.Framework.Assert.AreEqual("Corporations", Morphology.StemStatic(new WordTag("Corporations", "NNPS")).Word());
            WordTag hunt = new WordTag("hunting", "V");

            NUnit.Framework.Assert.AreEqual("hunt", Morphology.StemStatic(hunt).Word());
            NUnit.Framework.Assert.AreEqual("hunt", Morphology.LemmatizeStatic(hunt).Lemma());
        }
Exemple #2
0
        public virtual void TestStemStatic()
        {
            WordTag wt2 = new WordTag("objecting", "VBG");
            WordTag wt  = Morphology.StemStatic(wt2);

            NUnit.Framework.Assert.AreEqual("object", wt.Word());
            wt2 = new WordTag("broken", "VBN");
            wt  = Morphology.StemStatic(wt2);
            NUnit.Framework.Assert.AreEqual("break", wt.Word());
            wt2 = new WordTag("topoi", "NNS");
            wt  = Morphology.StemStatic(wt2);
            NUnit.Framework.Assert.AreEqual("topos", wt.Word());
            wt2 = new WordTag("radii", "NNS");
            wt  = Morphology.StemStatic(wt2);
            NUnit.Framework.Assert.AreEqual("radius", wt.Word());
        }
Exemple #3
0
 public virtual void TestDunno()
 {
     NUnit.Framework.Assert.AreEqual("do", Morphology.StemStatic(new WordTag("du", "VBP")).Word());
     NUnit.Framework.Assert.AreEqual("not", Morphology.StemStatic(new WordTag("n", "RB")).Word());
     NUnit.Framework.Assert.AreEqual("know", Morphology.StemStatic(new WordTag("no", "VB")).Word());
 }