Advertisement
furas

NLTK - remove words from stopwords

Jul 23rd, 2018
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. import nltk
  2. import nltk.corpus
  3.  
  4. w = nltk.corpus.stopwords.words('english')
  5.  
  6. print(type(w)) # list
  7. print(len(w))  # 179
  8.  
  9. w.remove('not')
  10. w.remove('no')
  11.  
  12. print(len(w))  # 177
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement