Created
May 23, 2017 16:03
-
-
Save Tathagatd96/0b05a46c5705a7dbc403d4c0d62272cb to your computer and use it in GitHub Desktop.
This file contains 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
print len(twenty_train.data) | |
print("\n".join(twenty_train.data[0].split("\n")[:3])) | |
print(twenty_train.target_names[twenty_train.target[0]]) | |
#Preprocessing | |
#Tokenizing text | |
count_vect=CountVectorizer() | |
X_train_counts=count_vect.fit_transform(twenty_train.data) | |
print(X_train_counts.shape) | |
print(count_vect.vocabulary_.get(u'algorithm')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment