Created
March 18, 2021 11:59
-
-
Save cydal/cb6b9ae6516a1496a41039a7cdccb186 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 | |
plt.figure(figsize=(40,40)) | |
j = np.ceil(len(set(labels_words))/10) | |
for topic_nbr, words in enumerate(set(labels_words)): | |
plt.subplot(j, 10, topic_nbr+1).set_title(str(topic_nbr)) | |
wordcloud = WordCloud(background_color="white", contour_color='steelblue') | |
wordcloud.generate(words) | |
plt.imshow(wordcloud.to_image()) | |
plt.axis("off") | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment