Skip to content

Commit

Permalink
fix: Pin nltk version for sentence tokenizer (#8786)
Browse files Browse the repository at this point in the history
* Pin nltk version for sentence tokenizer

* Update pyproject.toml

* Update haystack/components/preprocessors/sentence_tokenizer.py

---------

Co-authored-by: David S. Batista <[email protected]>
  • Loading branch information
Amnah199 and davidsbatista authored Jan 31, 2025
1 parent 80575a7 commit 379711f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion haystack/components/preprocessors/sentence_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from haystack import logging
from haystack.lazy_imports import LazyImport

with LazyImport("Run 'pip install nltk'") as nltk_imports:
with LazyImport("Run 'pip install nltk>=3.9.1'") as nltk_imports:
import nltk

logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ extra-dependencies = [
"openpyxl", # XLSXToDocument
"tabulate", # XLSXToDocument

"nltk", # NLTKDocumentSplitter
"nltk>=3.9.1", # NLTKDocumentSplitter

# OpenAPI
"jsonref", # OpenAPIServiceConnector, OpenAPIServiceToFunctions
Expand Down

0 comments on commit 379711f

Please sign in to comment.