projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update MAC address.
[python_utils.git]
/
profanity_filter.py
diff --git
a/profanity_filter.py
b/profanity_filter.py
index 5621cef94489f6b5446a9e786777a8cb93e68be4..fe5422179ba9a50c678188e088689184f139a14d 100755
(executable)
--- a/
profanity_filter.py
+++ b/
profanity_filter.py
@@
-347,6
+347,7
@@
class ProfanityFilter(object):
'poop chute',
'poopchute',
'porn',
'poop chute',
'poopchute',
'porn',
+ 'pron',
'pornhub',
'porno',
'pornographi',
'pornhub',
'porno',
'pornographi',
@@
-471,6
+472,11
@@
class ProfanityFilter(object):
def _normalize(self, text: str) -> str:
result = text.lower()
result = result.replace("_", " ")
def _normalize(self, text: str) -> str:
result = text.lower()
result = result.replace("_", " ")
+ result = result.replace('0', 'o')
+ result = result.replace('1', 'l')
+ result = result.replace('4', 'a')
+ result = result.replace('5', 's')
+ result = result.replace('3', 'e')
for x in string.punctuation:
result = result.replace(x, "")
chunks = [
for x in string.punctuation:
result = result.replace(x, "")
chunks = [