public void testStemming() {

            var stemmer = new PorterStemmer();

            Assert.AreEqual("deni", stemmer.Stem("deny"));
            Assert.AreEqual("declin", stemmer.Stem("declining"));
            Assert.AreEqual("divers", stemmer.Stem("diversity"));
            Assert.AreEqual("diver", stemmer.Stem("divers"));
            Assert.AreEqual("dental", stemmer.Stem("dental"));

        }       
Exemple #2
0
        public void TestFromPorter() {
            var stemmer = new PorterStemmer("en");

            foreach (var pair in dic) {
                var stem = stemmer.Stem(pair.Key);

                Assert.AreEqual(pair.Value, stem);
            }

        }