summaryrefslogtreecommitdiff
path: root/profanity_filter.py
diff options
context:
space:
mode:
Diffstat (limited to 'profanity_filter.py')
-rwxr-xr-xprofanity_filter.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/profanity_filter.py b/profanity_filter.py
index 95540fa..4723a2d 100755
--- a/profanity_filter.py
+++ b/profanity_filter.py
@@ -494,9 +494,7 @@ class ProfanityFilter(object):
result = result.replace('3', 'e')
for x in string.punctuation:
result = result.replace(x, "")
- chunks = [
- self.stemmer.stem(word) for word in nltk.word_tokenize(result)
- ]
+ chunks = [self.stemmer.stem(word) for word in nltk.word_tokenize(result)]
return ' '.join(chunks)
def tokenize(self, text: str):