Last active
January 11, 2020 23:16
-
-
Save mlai-demo/4ebd22e29211162d39679edc0ef05a83 to your computer and use it in GitHub Desktop.
Russell word cloud lemmatized
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
import pandas as pd | |
from wordcloud import WordCloud | |
import matplotlib.pyplot as plt | |
stemmed_text = open('TextsPub/Russell_lemma.txt').read() | |
wordcloud = WordCloud(stopwords=my_stop_words, | |
max_font_size=400, | |
width=2500, | |
height=2000, | |
random_state=64, | |
).generate(stemmed_text) | |
fig = plt.figure().set_size_inches(16, 16) | |
plt.imshow(wordcloud, interpolation="bilinear") | |
plt.axis("off") | |
plt.title('Bertrand Russell Wordcloud', fontsize= 20) | |
plt.xlabel("size", fontsize= 12) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment