Skip to content

Instantly share code, notes, and snippets.

@sergioprates
Created June 29, 2019 23:32
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 sergioprates/f3f07a6779330460b91174ce2b472d81 to your computer and use it in GitHub Desktop.
Save sergioprates/f3f07a6779330460b91174ce2b472d81 to your computer and use it in GitHub Desktop.
from sklearn.feature_extraction.text import TfidfVectorizer
vect = TfidfVectorizer(ngram_range=(1,4), use_idf=True, lowercase=True, min_df=2, max_df=0.95)
vect.fit(df.text_pt)
text_vect = vect.transform(df.text_pt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment