아래에 코드가 있으며 단어 목록에 정지 단어 목록을 적용하려고합니다. 그러나 결과에는 여전히 "a"및 "the"와 같은 단어가 표시되며이 과정에서 제거되었을 것으로 생각됩니다. 잘못된 아이디어는 훌륭합니다.NLTK 스톱 워드 목록
import nltk
from nltk.corpus import stopwords
word_list = open("xxx.y.txt", "r")
filtered_words = [w for w in word_list if not w in stopwords.words('english')]
print filtered_words
가능한 복제 (http://stackoverflow.com/questions/19130512/stopword-removal-with-nltk) –