Skip to content

Instantly share code, notes, and snippets.

@lakshay-arora
Created April 27, 2020 05:43
Show Gist options
  • Save lakshay-arora/343f1ef6e8a59efaeba10517bb0fad60 to your computer and use it in GitHub Desktop.
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