Commit 4fb188f1 by Sartika Aritonang

Upload New File

parent c0c48b2e
class StopWordRemover(object):
"""description of class"""
def __init__(self, dictionary):
self.dictionary = dictionary
def get_dictionary(self):
return self.dictionary
def remove(self, text):
"""Remove stop words."""
words = text.split(' ')
for word in words:
if self.dictionary.contains(word):
words.remove(word)
return ' '.join(words)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment