词云库
(1)安装:pip install wordcloud
(2)常规方法:
配置对象参数:w=wordcloud.WordCloud
(width,height,min_font_size,max_font_size,font_step,font_path,max_words,background_co
lor,mask)
加载词云文本:w.generate(‘文本内容’)
输出词云文本:w.to_file(‘文件名’)
https://www.cnblogs.com/diantong/p/12654331.html
pip install wordcloud
pip install jieba
第三方库:
(1)jieba库:
jieba.lcut(s):分割中文词
(2)beautifulsoup4库:
安装:pip install bs4/beautifulsoup4
常用导入方法:
导入库: from bs4 import BeautifullSoup
创建对象: soup=BeautifullSoup(文本/网页内
容,‘html.parser’)
输出网页代码:print(soup.prettify())
(3)requests库
Wordcloud库同理安装