from nltk.corpus import stopwords stoplist = stopwords.words('english') text = "this is just a test" cleanwordlist = [word for word in text.lower().split() if word not in stoplist]cleanwordlist
LookupError: ********************************************************************** Resource stopwords not found. Please use the NLTK Downloader to obtain the resource: import nltk >>> nltk.download('stopwords') 没有那就下
NLP NLTK stopwords
最新推荐文章于 2024-07-11 08:30:12 发布