Apply ML on weibo sentiment. 疫情背景下微博文本情感分析与可视化
Last updated Jul 3, 2026
44
Stars
5
Forks
0
Issues
0
Stars/day
Attention Score
65
Language breakdown
No language data available.
▸ Files
click to expand
README
covid-social-analysis
ML-based analysis of social media user attentiveness of COVID-19. 应用机器学习分析疫情背景下的微博文本情感
更多细节请看此 blog post
├───res
│ ├───input
│ │ ├───comment # 评论数据
│ │ ├───dict # 词典
│ │ ├───hot # 热词
│ │ ├───SOPMI
│ │ ├───stage # 不同阶段微博数据
│ │ └───topic # 微博数据
│ └───output
│ ├───clustering
│ │ ├───cluster-num # 聚类数
│ │ ├───image1 # 聚类分析饼图
│ │ └───image2 # 聚类数
│ ├───comment-txt # 评论数据-txt
│ ├───emotion-dict
│ │ └───image # 情感对比图
│ ├───hot
│ ├───multi-emotion
│ │ └───image # 多维情感分析图
│ └───topic-txt # 微博数据-txt
└───src
├───01crawling # 爬取数据
├───02preprocessing # 预处理
├───03analysis #分析
│ ├───clustering # 聚类
│ ├───emotion-dict # 情感词典
│ └───multi-emotion # 多维情感
└───04visualization # 可视化
├───clustering
├───emotion-dict
└───multi-emotion
1 Overview
- 手动爬取疫情背景下微博文本与评论,进行情感分析
- 分别尝试聚类、情感词典和多维度情感分析
- 主要工具包版本为 Python
3.6.10和 scikit-learn0.24.2
2 Setup
- clone repo:
git clone https://github.com/lunarwhite/covid-social-analysis.git - 更新 pip:
pip3 install --upgrade pip - 为项目创建虚拟环境:
conda create --name <env_name> python=3.6 - 激活 env:
conda activate <env_name> - 安装 Python 库依赖:
pip3 install -r requirements.txt
3 Workflow
- 数据获取
- 数据预处理
- 分析-情感词典
- 分析-聚类
- 分析-多维度分析
- 可视化
🔗 More in this category