Spaces:
Paused
Paused
Update functions_preprocess.py
Browse files- functions_preprocess.py +3 -1
functions_preprocess.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
|
2 |
import string
|
3 |
import pandas as pd
|
4 |
from bs4 import BeautifulSoup
|
@@ -8,8 +7,11 @@ from sklearn.base import TransformerMixin
|
|
8 |
from sklearn.metrics import ConfusionMatrixDisplay
|
9 |
from keras.preprocessing.text import Tokenizer
|
10 |
import nltk
|
|
|
11 |
from nltk.corpus import stopwords
|
12 |
from nltk.stem import WordNetLemmatizer
|
|
|
|
|
13 |
|
14 |
|
15 |
def download_if_non_existent(res_path, res_name):
|
|
|
|
|
1 |
import string
|
2 |
import pandas as pd
|
3 |
from bs4 import BeautifulSoup
|
|
|
7 |
from sklearn.metrics import ConfusionMatrixDisplay
|
8 |
from keras.preprocessing.text import Tokenizer
|
9 |
import nltk
|
10 |
+
nltk.download('stopwords')
|
11 |
from nltk.corpus import stopwords
|
12 |
from nltk.stem import WordNetLemmatizer
|
13 |
+
from nltk.tokenize import word_tokenize
|
14 |
+
from nltk.corpus import wordnet
|
15 |
|
16 |
|
17 |
def download_if_non_existent(res_path, res_name):
|