Merge pull request #29 from huggingface/nltk-fix

fix issue with ntlk
This commit is contained in:
Andrés Marafioti
2024-08-21 18:13:31 +02:00
committed by GitHub

View File

@@ -40,7 +40,7 @@ from utils import (
# Ensure that the necessary NLTK resources are available
try:
nltk.data.find('tokenizers/punkt_tab')
except LookupError:
except (LookupError, OSError):
nltk.download('punkt_tab')
# caching allows ~50% compilation time reduction