Spaces:
Running
Running
Create download_nltk_data.py
Browse files- download_nltk_data.py +9 -0
download_nltk_data.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import nltk
|
2 |
+
import os
|
3 |
+
|
4 |
+
# Set the NLTK_DATA environment variable
|
5 |
+
os.environ['NLTK_DATA'] = '/app/nltk_data'
|
6 |
+
|
7 |
+
# Download NLTK data
|
8 |
+
nltk.download('stopwords')
|
9 |
+
nltk.download('punkt')
|