Esempio n. 1
0
 def test_corpus_stop_list_zou(self):
     """Test production of stoplists from a corpus, using basis: zou"""
     target_list = ['ac', 'atque', 'cum', 'et', 'in', 'mihi', 'neque', 'qui', 'rerum', 'vel']
     S = CorpusStoplist('latin')
     stoplist = S.build_stoplist(self.test_corpus, size=10,basis='zou')
     self.assertEqual(stoplist, target_list)        
Esempio n. 2
0
 def test_corpus_stop_list_zou(self):
     """Test production of stoplists from a corpus, using basis: zou"""
     target_list = ['ac', 'atque', 'cum', 'et', 'in', 'mihi', 'neque', 'qui', 'rerum', 'vel']
     S = CorpusStoplist('latin')
     stoplist = S.build_stoplist(self.test_corpus, size=10,basis='zou')
     self.assertEqual(stoplist, target_list)
Esempio n. 3
0
 def test_corpus_stop_list_freq_sort_words(self):
     """Test production of stoplists from a corpus, using basis: frequency"""
     target_list = ['in', 'et', 'vel', 'ac', 'cum', 'qui', 'atque', 'mihi', 'ad', 'neque']
     S = CorpusStoplist('latin')
     stoplist = S.build_stoplist(self.test_corpus, size=10, basis='frequency', sort_words=False)
     self.assertEqual(stoplist, target_list)        
Esempio n. 4
0
 def test_corpus_stop_list_freq_sort_words(self):
     """Test production of stoplists from a corpus, using basis: frequency"""
     target_list = ['in', 'et', 'vel', 'ac', 'cum', 'qui', 'atque', 'mihi', 'ad', 'neque']
     S = CorpusStoplist('latin')
     stoplist = S.build_stoplist(self.test_corpus, size=10, basis='frequency', sort_words=False)
     self.assertEqual(stoplist, target_list)