def test_remove_stopwords_return_string(self): cl = Cleaners() clean = cl.remove_stopwords(['mina', 'olen', 'pikk', 'poiss'], stopwords=['olen'], return_string=True) self.assertEqual(clean, 'mina pikk poiss')
def test_remove_stopwords_default(self): cl = Cleaners('tests/stopwords/stopwords.txt') clean = cl.remove_stopwords(['yes', 'very', 'no'], return_string=True) self.assertEqual(clean, 'very')
def test_remove_stopwords_return_list(self): cl = Cleaners() clean = cl.remove_stopwords(['mina', 'olen', 'pikk', 'poiss'], stopwords=['olen']) self.assertEqual(clean, ['mina', 'pikk', 'poiss'])