Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

{{
import re

class StoplistFileError(Exception):
"Used to indicate that a stoplist file breaks one or more formatting rules."

...

def remove_stopwords(self, words):
if words is None:
return None
filtered_words = []
for word in words:
if word.lower() not in self:
filtered_words.append(word)
return filtered_words
}}