Skip to content

Instantly share code, notes, and snippets.

@shubham769
Created April 29, 2020 13:00
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 shubham769/b15fa46d9d158e3afb1d9aa7fb48b9d9 to your computer and use it in GitHub Desktop.
Save shubham769/b15fa46d9d158e3afb1d9aa7fb48b9d9 to your computer and use it in GitHub Desktop.
import nltk
stop_words = set(stopwords.words("english"))
sentence = "We are one of the organization using tensorflow heavily."
words = nltk.word_tokenize(sentence)
without_stop_words = [word for word in words if not word in stop_words]
print(without_stop_words)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment