Skip to content

Instantly share code, notes, and snippets.

@darcwader
Created October 29, 2017 13:38
Show Gist options
  • Select an option

  • Save darcwader/d918dbb62cebb8d64518423fddc5e691 to your computer and use it in GitHub Desktop.

Select an option

Save darcwader/d918dbb62cebb8d64518423fddc5e691 to your computer and use it in GitHub Desktop.
spam
idf = {}
idf['idf'] = tfidf.idf_.tolist()
with open('words_idf.json', 'wb') as fp:
json.dump(idf, fp)
print("IDF of corpus :", tfidf.idf_)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment