From 7eeb411ce676f7b61838705fb4c6d0f50748456f Mon Sep 17 00:00:00 2001 From: christinestraub Date: Tue, 7 Jan 2025 09:21:00 -0800 Subject: [PATCH] removed if statement in tokenize --- unstructured/nlp/tokenize.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/unstructured/nlp/tokenize.py b/unstructured/nlp/tokenize.py index c7420b2888..c47fd614dc 100644 --- a/unstructured/nlp/tokenize.py +++ b/unstructured/nlp/tokenize.py @@ -46,11 +46,7 @@ def _ensure_nltk_packages_available(): package_name="punkt_tab", ) - if not tagger_available or not tokenizer_available: - raise RuntimeError( - "Required NLTK packages are not available. " - "Ensure the assets are pre-baked into the image." - ) + @lru_cache(maxsize=CACHE_MAX_SIZE)