Skip to content

Instantly share code, notes, and snippets.

@mwitiderrick
Created June 14, 2018 16:45
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 mwitiderrick/3a92764520a712f84381db33566ca59e to your computer and use it in GitHub Desktop.
Save mwitiderrick/3a92764520a712f84381db33566ca59e to your computer and use it in GitHub Desktop.
from sklearn.feature_extraction.text import TfidfVectorizer
tfidfVectorizer = TfidfVectorizer(max_features =2000)
X = tfidfVectorizer.fit_transform(corpus).toarray()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment