Skip to content

Instantly share code, notes, and snippets.

@lakshay-arora
Created April 27, 2020 05:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save lakshay-arora/343f1ef6e8a59efaeba10517bb0fad60 to your computer and use it in GitHub Desktop.
# create a TF-IDF vectorizer object
tfidf_vectorizer = TfidfVectorizer(lowercase= True, max_features=1000, stop_words=ENGLISH_STOP_WORDS)
# fit the object with the training data tweets
tfidf_vectorizer.fit(train.tweet)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment