Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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