Skip to content

Instantly share code, notes, and snippets.

@ilyasst
Created April 18, 2017 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilyasst/6e7998246845f0925d8fc7ec6cdbdb54 to your computer and use it in GitHub Desktop.
Save ilyasst/6e7998246845f0925d8fc7ec6cdbdb54 to your computer and use it in GitHub Desktop.
Write stopwrods from nltk corpora/stopwords to a text file
from nltk.corpus import stopwords
with open("./stopwords.txt",'w') as outFile:
stop_words = set(stopwords.words('english'))
for w in stop_words:
outFile.write(w+"\n")
outFile.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment