Example #1
0
class testCobeStemmer(unittest.TestCase):
    def setUp(self):
        self.stemmer = CobeStemmer("english")

    def testStemmer(self):
        self.assertEqual("foo", self.stemmer.stem("foo"))
        self.assertEqual("jump", self.stemmer.stem("jumping"))
        self.assertEqual("run", self.stemmer.stem("running"))

    def testStemmerCase(self):
        self.assertEqual("foo", self.stemmer.stem("Foo"))
        self.assertEqual("foo", self.stemmer.stem("FOO"))

        self.assertEqual("foo", self.stemmer.stem("FOO'S"))
        self.assertEqual("foo", self.stemmer.stem("FOOING"))
        self.assertEqual("foo", self.stemmer.stem("Fooing"))
Example #2
0
class testCobeStemmer(unittest.TestCase):
    def setUp(self):
        self.stemmer = CobeStemmer("english")

    def testStemmer(self):
        self.assertEquals("foo", self.stemmer.stem("foo"))
        self.assertEquals("jump", self.stemmer.stem("jumping"))
        self.assertEquals("run", self.stemmer.stem("running"))

    def testStemmerCase(self):
        self.assertEquals("foo", self.stemmer.stem("Foo"))
        self.assertEquals("foo", self.stemmer.stem("FOO"))

        self.assertEquals("foo", self.stemmer.stem("FOO'S"))
        self.assertEquals("foo", self.stemmer.stem("FOOING"))
        self.assertEquals("foo", self.stemmer.stem("Fooing"))
Example #3
0
 def setUp(self):
     self.stemmer = CobeStemmer("english")
Example #4
0
 def setUp(self):
     self.stemmer = CobeStemmer("english")