1、gensim 包

  1. from gensim.parsing.preprocessing import STOPWORDS
  2. ls_stopwords = list(STOPWORDS)
  3. print(ls_stopwords) # jy: 337

2、nltk 包

  1. import nltk
  2. nltk.download('stopwords')
  3. stop_words = nltk.corpus.stopwords.words('english')
  4. print(len(stop_words))
  5. print(stop_words[:7])
  6. print([sw for sw in stop_words if len(sw) == 1])