import nltk
from wordcloud import WordCloud
import matplotlib.pyplot as plt

nltk.download("book", quiet=False)
nltk.corpus.gutenberg.fileids()
emma_raw = nltk.corpus.gutenberg.raw("austen-emma.txt")
cw = WordCloud(max_font_size=100).generate(emma_raw)
plt.imshow(cw, interpolation="mitchell")
plt.show()

 



 

'{BE} Python 3.1x' 카테고리의 다른 글

pyCharm 세팅  (0) 2020.06.23
티스토리 카테고리 크롱크롱  (0) 2020.06.23
pyCharm opensources  (0) 2020.06.21
How to disable vim on pyCharm  (0) 2020.06.19
Making pyCharm shortcuts to be the Xcode one's  (0) 2020.06.19

+ Recent posts