Skip to content

Commit

Permalink
hooks: update runtime hook for NLTK (#646)
Browse files Browse the repository at this point in the history
If `nltk_data` can be found both in the frozen program and under the
default location specified by `NLTK`, the former should be preferred
over the latter.
  • Loading branch information
BLKSerene authored Sep 28, 2023
1 parent 1797ce9 commit 39b588b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/646.update.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
If ``nltk_data`` can be found both in the frozen program and under the default location specified by ``NLTK``, the former should be preferred to the latter.
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
import nltk

#add the path to nltk_data
nltk.data.path.append(os.path.join(sys._MEIPASS, "nltk_data"))
nltk.data.path.insert(0, os.path.join(sys._MEIPASS, "nltk_data"))

0 comments on commit 39b588b

Please sign in to comment.