Skip to content

Instantly share code, notes, and snippets.

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 yavuzKomecoglu/7679e7a49cc2e641fa3131498871c429 to your computer and use it in GitHub Desktop.
Save yavuzKomecoglu/7679e7a49cc2e641fa3131498871c429 to your computer and use it in GitHub Desktop.
from wordcloud import WordCloud
def generate_word_cloud_from_frequencies(freq_dict, status):
wordcloud = WordCloud(
width=800,
height=400,
background_color = 'black',
stopwords = stop_words).generate_from_frequencies(frequencies=freq_dict)
plt.figure( figsize=(20,10), facecolor='k')
plt.imshow(wordcloud)
plt.axis("off")
plt.tight_layout(pad=0)
plt.show()
wordcloud.to_file(SAVE_WORD_CLOUD_FILEPATH.format(status))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment