数据集
收藏阿里云天池2026-05-26 更新2025-04-19 收录
下载链接:
https://tianchi.aliyun.com/dataset/188047
下载链接
链接失效反馈官方服务:
资源简介:
阈值设定:定义了好评、中评、差评的阈值,分别为 0.8 和 0.3。
数据读取:使用 pandas 读取 CSV 文件,同时对可能出现的文件读取错误进行异常处理。
情感分析:定义 get_sentiment 函数,利用 SnowNLP 计算每条评论的情感得分,然后去除得分缺失的行。
评论划分:根据设定的阈值将评论划分为正评、中评和负评。
词云生成函数:定义 generate_wordcloud 函数,把分词结果合并成一个字符串,使用 WordCloud 生成词云图,并保存到指定路径。
结果保存:分别生成正评、中评和负评的词云图,并保存到 D:\桌面\结果 目录下。
Threshold Setting: Define the thresholds for positive, neutral and negative reviews, which are 0.8 and 0.3 respectively.
Data Reading: Read CSV files using pandas, with exception handling for potential file reading errors.
Sentiment Analysis: Define the `get_sentiment` function, which uses SnowNLP to calculate the sentiment score of each review, then remove rows with missing scores.
Review Classification: Classify reviews into positive, neutral and negative categories based on the preset thresholds.
Word Cloud Generation Function: Define the `generate_wordcloud` function, which merges word segmentation results into a single string, generates word cloud images using WordCloud, and saves them to the specified path.
Result Saving: Generate word cloud images for positive, neutral and negative reviews respectively, and save them to the directory `D:DesktopResults`.
提供机构:
阿里云天池
创建时间:
2024-10-13
搜集汇总
数据集介绍

背景与挑战
背景概述
该数据集用于情感分析任务,包含评论数据,通过设定阈值将评论划分为正评、中评和差评,并生成词云图。数据文件为'论文数据合集_预处理结果.csv',大小为5.94MB,上传于2025年4月9日。
以上内容由遇见数据集搜集并总结生成



