我需要反复删除文章中的某些停用词。目前,我正在使用函数str_replace来实现这一点。作为第一个参数,我使用stop list数组变量来删除所有出现的停用词。这样做很好,除了它还删除了出现在单词中间的任何匹配(即,如果停用词是"th“,它将从" the ","then”等中删除"th“)。现在,如果我使用纯文本提供参数,我可以在单词的两边
我只想从一个专栏中删除所有的英语停用词,而其他专栏则保持不变。这是我从nltk.corpus中提取停用词列表的代码: from nltk.corpus import stopwords
stopWordsListEng = stopwords.words("english") 但我想添加我能想到的其他停用词: according accordingly across act actually 我还没有想出如何将它添加到现有的停<em