Created
May 22, 2022 19:59
-
-
Save YHaruoka/6ff3c1080a83e0e5c648c7f4e5199008 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from wordcloud import WordCloud | |
import matplotlib.pyplot as plt | |
text = open("test.txt",encoding='utf-8').read() | |
wordcloud = WordCloud(width=1920, height=1080, max_words=200,background_color="white").generate(text) | |
wordcloud.to_file("word_cloud_result.png") | |
plt.imshow(wordcloud) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment