python python making word cloud learning how my first python python do word cloud word cloud

The first is the idea of ​​the code for this article:

Note: This code word cloud

You need to prepare

  1. Words to save the contents of text files
  2. A png format images 

the whole idea:

  1. First, you get need to analyze the words to save the contents of a file,
  2. Then read the file.
  3. Then open an existing png image (in fact, the amount you can wear a piece of this code needs to open an existing),
  4. Then use the parameter setting word cloud image size and other parameters, the picture is filled with content.
  5. 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

 

Guess you like

Origin www.cnblogs.com/stillstep/p/11141104.html