python学习笔记(11)--词云
2024-10-18 22:38:08
中分词库 jieba
词云 wordcloud
import jieba
import wordcloud
f = open("新时代中国特色社会主义.txt", "r", encodint="utf-8")
t = f.read()
f.close()
ls = jieba.lcut(t)
txt = " ".join(ls)
w = wordcloud.WordCloud( font_path = "msyh.ttc", \
width = 1000, height = 700, background_color="white")
w.generate(txt)
w.to_file("wordcloud.png")
http://yciyun.com/
最新文章
- C#语法糖(Csharp Syntactic sugar)大汇总
- FPS
- 项目:BluetoothChat
- 第一部分:使用iReport制作报表的详细过程(Windows环境下)
- 收集oracle统计信息
- 小白也能用Git管理团队项目了:百度云同步+Git Extensions+Git Source Control Provider
- MYSQL批量插入数据库实现语句性能分析
- css+js+html基础知识总结
- [Angular 2] Generate and Render Angular 2 Template Elements in a Component
- Asp.Net微信登录-手机网站APP应用
- HeadFirst设计模式之RMI介绍
- Podfile 文件的编写
- js鼠标滑动图片显示隐藏效果
- 滚动到指定元素的id处+当元素出现在浏览器显示区域就会自动加载
- 两端对齐justify
- Lucene学习笔记1(V7.1)
- JSTL遇到的问题
- mvc,mvp.mvvm模型
- Python 编码风格指南
- mysql 百万级数据库优化方案
热门文章
- ubantu 安装 wget
- 正确生成浮点型的方法,解决sqlachemy Float浮点型的坑,生成float类型时,长度和精度均为0,导致查询不到结果!
- Spring Security(一):官网向导翻译
- Uncaught ReferenceError: layer is not defined
- 【Windows】+ windows下在某一文件夹下按“shift+鼠标右键”打开CMD窗口
- day96
- C#使用Json.Net遍历Json
- 分享一个公众号h5裂变吸粉源码工具
- 聊聊阿里社招面试,谈谈“野生”Java程序员学习的道路
- tomcat7 内存溢出 java.lang.OutOfMemoryError 处理方法