Spaces:
Sleeping
Sleeping
Commit ·
bd15546
1
Parent(s): da62426
Update functions.py
Browse files- functions.py +1 -2
functions.py
CHANGED
|
@@ -26,9 +26,8 @@ def get_wordnet_pos(treebank_tag):
|
|
| 26 |
else:
|
| 27 |
return wordnet.NOUN
|
| 28 |
|
| 29 |
-
lemmatizer = WordNetLemmatizer()
|
| 30 |
-
|
| 31 |
def preprocess_text(text):
|
|
|
|
| 32 |
text = text.lower() # lowercase text
|
| 33 |
tokens = word_tokenize(text) # tokenize
|
| 34 |
filtered_words = [word for word in tokens if word.lower() not in stopword_list]
|
|
|
|
| 26 |
else:
|
| 27 |
return wordnet.NOUN
|
| 28 |
|
|
|
|
|
|
|
| 29 |
def preprocess_text(text):
|
| 30 |
+
lemmatizer = WordNetLemmatizer()
|
| 31 |
text = text.lower() # lowercase text
|
| 32 |
tokens = word_tokenize(text) # tokenize
|
| 33 |
filtered_words = [word for word in tokens if word.lower() not in stopword_list]
|