You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
634 B
35 lines
634 B
# python词云图
|
|
|
|
利用python进行文本分析并分词(完成作业)
|
|
|
|
|
|
|
|
# 安装
|
|
|
|
在pycham处的Terminal输入以下命令安装相关函数库
|
|
|
|
```base
|
|
pip install -r requriements.txt
|
|
```
|
|
|
|
|
|
|
|
# 模块化设计
|
|
|
|
运行demo.py文件即可得到词云图
|
|
|
|
remove.py 删除文中的非关键字(例如:‘你’,‘我’ ,等字)
|
|
|
|
word.py 通过jieba进行分词
|
|
|
|
plat.py 绘制词云图
|
|
|
|
|
|
|
|
# 输出结果
|
|
|
|
运行结果将保存在 images/save.png 处,运行样例如下:
|
|
|
|
<img src="README.assets/2.png" alt="图片" style="zoom:50%;" />
|
|
|
|
<img src="README.assets/covid.png" alt="我的照片" style="zoom: 50%;" /> |