projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bugfixes.
[python_utils.git]
/
profanity_filter.py
diff --git
a/profanity_filter.py
b/profanity_filter.py
index f238e7dbda085486f41483ca73ebdbe2b99569b3..31577e0fbf1a4a76486dab066fff764aeb5bbc47 100755
(executable)
--- a/
profanity_filter.py
+++ b/
profanity_filter.py
@@
-8,12
+8,14
@@
import sys
import nltk
from nltk.stem import PorterStemmer
import nltk
from nltk.stem import PorterStemmer
+import decorator_utils
import string_utils
logger = logging.getLogger(__name__)
import string_utils
logger = logging.getLogger(__name__)
+@decorator_utils.singleton
class ProfanityFilter(object):
def __init__(self):
self.bad_words = set([
class ProfanityFilter(object):
def __init__(self):
self.bad_words = set([
@@
-82,6
+84,7
@@
class ProfanityFilter(object):
'blonde action',
'blow j',
'blow job',
'blonde action',
'blow j',
'blow job',
+ 'blowjob',
'blow my',
'blow me',
'blow ourselv',
'blow my',
'blow me',
'blow ourselv',