Let's use python's wordcloud easily!

What is python's WordCloud library?

The guy who shows the words that appear frequently in the sentence in the size according to the frequency!

wordcloud official documentation

Official gallery

Let's use it easily

environment

$ python3 -V
Python 3.7.3

Virtual environment construction

$ mkdir wordcloud-sample    
$ cd wordcloud-sample 
$ python3 -m venv venv
$ source ./venv/bin/activate

wordcloud installation

$ pip install wordcloud

Run wordcloud

$ python3
Python 3.7.3 (default, Mar  6 2020, 22:34:30) 
[Clang 11.0.3 (clang-1103.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from wordcloud import WordCloud
>>> WordCloud().generate("hello world").to_image().show()

Execution result

helloworld.png


It was good

Recommended Posts

Let's use python's wordcloud easily!
Let's use python janome easily
Let's use pytube
Let's use def in python
Use Python's MeCab binding natto-py
Let's use MemSQL Vol.14: Practice 7
Let's use MemSQL Vol.13: Practice 6
Let's use usercustomize.py instead of sitecustomize.py
Let's move Cython and Numba easily
Let's use tomotopy instead of gensim
How to use Python's logging module
Make full use of Python's str.format
[Introduction to Python] Let's use pandas
[Introduction to Python] Let's use pandas
[Introduction to Python] Let's use pandas
How to use Python's Context Manager