Spaces:
Running
Running
bypass nltk problem
Browse files- .gitignore +1 -0
- extract.py +3 -1
.gitignore
CHANGED
@@ -1 +1,2 @@
|
|
1 |
__pycache__/
|
|
|
|
1 |
__pycache__/
|
2 |
+
nltk-data
|
extract.py
CHANGED
@@ -1,5 +1,7 @@
|
|
|
|
1 |
import nltk
|
2 |
-
nltk.download('punkt')
|
|
|
3 |
|
4 |
from nltk.cluster.util import cosine_distance
|
5 |
from nltk.tokenize import sent_tokenize, word_tokenize
|
|
|
1 |
+
import os
|
2 |
import nltk
|
3 |
+
nltk.download('punkt', download_dir=os.path.join(os.getcwd(), 'nltk-data'))
|
4 |
+
print(nltk.data.path)
|
5 |
|
6 |
from nltk.cluster.util import cosine_distance
|
7 |
from nltk.tokenize import sent_tokenize, word_tokenize
|