Exemplo n.º 1
0
 def test_removeStopwords_4(self):
     sent = "finally".split()
     self.assertEqual(textprocessing._removeStopwords(sent), ["finally"])
Exemplo n.º 2
0
 def test_removeStopwords_3(self):
     from nltk.corpus import stopwords
     sent = stopwords.words("english")
     self.assertEqual(textprocessing._removeStopwords(sent), [])
Exemplo n.º 3
0
 def test_removeStopwords_1(self):
     sent = "and then there were none".split()
     self.assertEqual(textprocessing._removeStopwords(sent),
                      ["none"])
Exemplo n.º 4
0
 def test_removeStopwords_2(self):
     sent = "no stopwords here".split()
     self.assertEqual(textprocessing._removeStopwords(sent),
                      ["stopwords"])
Exemplo n.º 5
0
 def test_removeStopwords_2(self):
     sent = 'no stopwords here'.split()
     self.assertEqual(textprocessing._removeStopwords(sent),
                      ['stopwords'])