diff --git a/flashtext/keyword.py b/flashtext/keyword.py index f358c77..f21e3e1 100644 --- a/flashtext/keyword.py +++ b/flashtext/keyword.py @@ -45,10 +45,10 @@ def __init__(self, case_sensitive=False): self._white_space_chars = set(['.', '\t', '\n', '\a', ' ', ',']) try: # python 2.x - self.non_word_boundaries = set(string.digits + string.letters + '_') + self.non_word_boundaries = set('_') except AttributeError: # python 3.x - self.non_word_boundaries = set(string.digits + string.ascii_letters + '_') + self.non_word_boundaries = set('_') self.keyword_trie_dict = dict() self.case_sensitive = case_sensitive self._terms_in_trie = 0