我在使用nltk消除和标记.text文件时遇到了困难。我不断得到下面的AttributeError: 'list' object has no attribute 'lower'。我将感谢您的建议,谢谢 from nltk.corpus import stopwords tokens = nltk.word_tokenize(s)
我正在尝试从文本集合中排除stopwords。从底部可以看到,t保存这些文本。我检查文本中的单词是否不在stopword列表中,然后返回不在stopwords中的单词。1945-Roosevelt.txt','1981-Reagan.txt','1985-Reagan.txt'
from nltk.corpus