Skip to content

Instantly share code, notes, and snippets.

@letthedataconfess
Created January 27, 2021 07:05
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 letthedataconfess/5e52b7b6346339b8e53d2e674f327308 to your computer and use it in GitHub Desktop.
Save letthedataconfess/5e52b7b6346339b8e53d2e674f327308 to your computer and use it in GitHub Desktop.
sentiment analysis
from sklearn.feature_extraction.text import TfidfVectorizer
tfidf=TfidfVectorizer()
x_train_tfidf = tfidf.fit_transform(x_train)
x_test_tfidf = tfidf.transform(x_test)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment