Removing stopwords from a textblob

前提是你 提交于 2020-07-05 10:14:51

问题


I'm processing a textblob and one of the steps is stopwords removal. Textblobs are immutable, so I'm turning one into a list to do the job:

blob = tb(tekst)
lista = [word for word in blob.words if word not in stopwords.words('english')]
tekst = ' '.join(lista)
blob = tb(tekst)

Is there a simpler / more elegant solution for the problem?

来源:https://stackoverflow.com/questions/46959492/removing-stopwords-from-a-textblob

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!