コード例 #1
0
class testContentAnalyzer_stemming(unittest.TestCase):

    def setUp(self):

        self.stemmer = Stemming()

    def tearDown(self):
        self.stemmer = None
    
    def testStemmedWords(self):

        stemmed_text = ['jump']

        self.assertEqual(self.stemmer.stem("Jumped"), stemmed_text)

    def testStopWords(self):

        stop_knock = []

        self.assertEqual(self.stemmer.stopword(['The','a','an','and']),stop_knock)
コード例 #2
0
    def setUp(self):

        self.stemmer = Stemming()