Skip to content

Commit

Permalink
Use nltk.download('punkt_tab'), pin nltk>=3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
vblagoje committed Aug 20, 2024
1 parent 9b7f9fb commit 8ba72dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion haystack/nodes/preprocessor/preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def __init__(
nltk.data.find("tokenizers/punkt")
except LookupError:
try:
nltk.download("punkt")
nltk.download("punkt_tab")
except FileExistsError as error:
logger.debug("NLTK punkt tokenizer seems to be already downloaded. Error message: %s", error)
pass
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ crawler = [
"selenium>=4.11.0"
]
preprocessing = [
"nltk",
"nltk>=3.9",
"langdetect", # for language classification
]
file-conversion = [
Expand Down

0 comments on commit 8ba72dc

Please sign in to comment.