Answers for "use nltk to remove stop words"

0

use nltk to remove stop words

from nltk.corpus import stopwords
nltk.download("stopwords")
stop = set(stopwords.words("english"))
filtered_words = [word.lower() for word in text.split() if word.lower() not in stop]
Posted by: Guest on August-10-2021

Code answers related to "use nltk to remove stop words"

Python Answers by Framework

Browse Popular Code Answers by Language