Skip to content

Commit

Permalink
Merge pull request #43 from roman-y-korolev/bump-textblob
Browse files Browse the repository at this point in the history
Bump textblob
  • Loading branch information
Dean Malmgren authored Aug 26, 2019
2 parents 914bda4 + 469ef10 commit 4f4019f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements/python
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
textblob==0.10.0
textblob==0.15.3
argcomplete
phonenumbers
5 changes: 5 additions & 0 deletions scrubadub/detectors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

from ..import_magic import iter_subclasses, update_locals
from .base import Detector
from textblob.blob import BaseBlob
from textblob.en.taggers import PatternTagger

# BaseBlob uses NLTKTagger as a pos_tagger, but it works wrong
BaseBlob.pos_tagger = PatternTagger()


def _is_abstract_detector(detector_cls):
Expand Down
2 changes: 1 addition & 1 deletion scrubadub/detectors/name.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def iter_filth(self, text):
if proper_nouns:
re_list = []
for proper_noun in proper_nouns:
re_list.append(r'\b' + re.escape(proper_noun) + r'\b')
re_list.append(r'\b' + re.escape(str(proper_noun)) + r'\b')
self.filth_cls.regex = re.compile('|'.join(re_list))
else:
self.filth_cls.regex = None
Expand Down

0 comments on commit 4f4019f

Please sign in to comment.