Skip to content

Commit

Permalink
Make hack to keep NLTKs "tokenize" module work with pathlib (#2896)
Browse files Browse the repository at this point in the history
  • Loading branch information
dannysepler committed Nov 28, 2021
1 parent de27a05 commit 43187f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nltk/decorators.py
Expand Up @@ -20,7 +20,7 @@
# Hack to keep NLTK's "tokenize" module from colliding with the "tokenize" in
# the Python standard library.
OLD_SYS_PATH = sys.path[:]
sys.path = [p for p in sys.path if p and "nltk" not in p]
sys.path = [p for p in sys.path if p and "nltk" not in str(p)]
import inspect

sys.path = OLD_SYS_PATH
Expand Down

0 comments on commit 43187f2

Please sign in to comment.