Created
July 21, 2017 12:52
-
-
Save FranciscusRenatus/cc5fb3b8be8c85982759aa0e914a8df2 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
# Creating the Bag of Words model | |
from sklearn.feature_extraction.text import CountVectorizer | |
cv = CountVectorizer(max_features = 1500) | |
X = cv.fit_transform(corpus).toarray() | |
y = dataset.iloc[:, 1].values |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment