Skip to content

Commit

Permalink
nltk: fix broken punkt download (#619)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbsp authored Aug 12, 2024
1 parent 81a9bec commit 83f5dc8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/itchy-ligers-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-plugins-nltk": patch
---

nltk: fix broken punkt download
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def __init__(self):

def download_files(self):
try:
_ = nltk.data.find("tokenizers/punkt")
_ = nltk.data.find("tokenizers/punkt_tab")
except LookupError:
nltk.download("punkt")
nltk.download("punkt_tab")


Plugin.register_plugin(NltkPlugin())
2 changes: 1 addition & 1 deletion livekit-plugins/livekit-plugins-nltk/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
license="Apache-2.0",
packages=setuptools.find_namespace_packages(include=["livekit.*"]),
python_requires=">=3.9.0",
install_requires=["livekit-agents>=0.8.0.dev0", "nltk >= 3, < 4"],
install_requires=["livekit-agents>=0.8.0.dev0", "nltk >= 3.8.2, < 4"],
package_data={"livekit.plugins.nltk": ["py.typed"]},
project_urls={
"Documentation": "https://docs.livekit.io",
Expand Down

0 comments on commit 83f5dc8

Please sign in to comment.