From 19f95f33ead4f6e217e4faeacbc860a7f10976fb Mon Sep 17 00:00:00 2001 From: George Lopatenko <81328772+Lopa10ko@users.noreply.github.com> Date: Fri, 16 Aug 2024 17:54:45 +0300 Subject: [PATCH] hotfix: pin nltk version to avoid downloading punkt_tab (#1321) * fix: pin nltk to avoid downloading punkt_tab instead of punkt * fix: remove punkt_tab from nltk lookup list --- .../data_operations/text_preprocessing.py | 2 +- other_requirements/extra.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fedot/core/operations/evaluation/operation_implementations/data_operations/text_preprocessing.py b/fedot/core/operations/evaluation/operation_implementations/data_operations/text_preprocessing.py index 61a1da537d..929bfe5897 100644 --- a/fedot/core/operations/evaluation/operation_implementations/data_operations/text_preprocessing.py +++ b/fedot/core/operations/evaluation/operation_implementations/data_operations/text_preprocessing.py @@ -65,7 +65,7 @@ def transform(self, input_data: InputData) -> OutputData: @staticmethod def _download_nltk_resources(): - for resource in ['punkt', 'punkt_tab']: + for resource in ['punkt']: try: nltk.data.find(f'tokenizers/{resource}') except LookupError: diff --git a/other_requirements/extra.txt b/other_requirements/extra.txt index 7aa4c932a9..cf2980ec4f 100644 --- a/other_requirements/extra.txt +++ b/other_requirements/extra.txt @@ -8,7 +8,7 @@ Pillow >= 8.2.0 # Texts gensim==4.3.2 -nltk >= 3.5 +nltk==3.8.1 # Misc protobuf~=3.19.0