1. 程式人生 > 其它 >自然語言處理(8)NLTK 停用詞表

自然語言處理(8)NLTK 停用詞表

技術標籤:自然語言處理python自然語言處理nltk演算法

NLTK 提供了使用最普遍的停用詞表

import nltk

# nltk.download('stopwords')
stop_words = nltk.corpus.stopwords.words('english')
print(len(stop_words))
print(stop_words[:7])

print([sw for sw in stop_words if len(sw) == 1])