Last active
March 17, 2020 03:31
-
-
Save jerryan999/31199bc4fa6309eac031599ddce4fe5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.feature_extraction.text import TfidfVectorizer | |
documents = [ | |
"The quick brown fox jumped over the lazy dog's back", | |
"Now is the time for all good men to come to the aid of their party" | |
] | |
vectorizer = TfidfVectorizer(stop_words=["for","is","of","the","to"]) | |
X = vectorizer.fit_transform(documents) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment