Spaces:
Sleeping
Sleeping
Update tasks/utils/preprocessing.py
Browse files
tasks/utils/preprocessing.py
CHANGED
@@ -5,11 +5,13 @@ from nltk.corpus import stopwords
|
|
5 |
import nltk
|
6 |
import spacy
|
7 |
|
|
|
8 |
# Get the list of English stop words from NLTK
|
9 |
nltk_stop_words = stopwords.words('english')
|
10 |
-
|
11 |
# Load the spaCy model for English
|
12 |
nlp = spacy.load("en_core_web_sm")
|
|
|
|
|
13 |
def process_text(text):
|
14 |
"""
|
15 |
Process text by:
|
|
|
5 |
import nltk
|
6 |
import spacy
|
7 |
|
8 |
+
nltk.download('stopwords')
|
9 |
# Get the list of English stop words from NLTK
|
10 |
nltk_stop_words = stopwords.words('english')
|
|
|
11 |
# Load the spaCy model for English
|
12 |
nlp = spacy.load("en_core_web_sm")
|
13 |
+
|
14 |
+
|
15 |
def process_text(text):
|
16 |
"""
|
17 |
Process text by:
|