The first is the idea of the code for this article:
Note: This code word cloud
You need to prepare
- Words to save the contents of text files
- A png format images
the whole idea:
- First, you get need to analyze the words to save the contents of a file,
- Then read the file.
- Then open an existing png image (in fact, the amount you can wear a piece of this code needs to open an existing),
- Then use the parameter setting word cloud image size and other parameters, the picture is filled with content.
- Then save the image file to go to see the picture file directory already have
Installation using pip dependencies
pip install jieba
pip install matplotlib
pip install pillow
pip install numpy
Well code or go to the original view it
Bloggers code problems not only analyze English Chinese
https://blog.csdn.net/wolfcode_cn/article/details/80676374