SHARE
TWEET

NLTK - remove words from stopwords

furas Jul 23rd, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top