Skip to content

Instantly share code, notes, and snippets.

@vncsna
Created March 13, 2021 13:59
Show Gist options
  • Save vncsna/3e02783f0d3cae42d3f25832e1e67745 to your computer and use it in GitHub Desktop.
Save vncsna/3e02783f0d3cae42d3f25832e1e67745 to your computer and use it in GitHub Desktop.
vectorizer = TfidfVectorizer(analyzer='word')
x = vectorizer.fit_transform(corpus)
'Corpus: ' + ' '.join(vectorizer.get_feature_names())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment