Skip to content

Instantly share code, notes, and snippets.

@shubham-singh-ss
Created May 31, 2019 05:58
Show Gist options
  • Save shubham-singh-ss/fae2a0032db371d76fffe9ff75374fba to your computer and use it in GitHub Desktop.
Save shubham-singh-ss/fae2a0032db371d76fffe9ff75374fba to your computer and use it in GitHub Desktop.
from sklearn.feature_extraction.text import CountVectorizer  
cv = CountVectorizer(max_features = 1500)
X = cv.fit_transform(corpus, corpus1).toarray()
y = df_new.iloc[:, 3].values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment