CoolFace
Datasetpublic

OpenModels/Chinese-Herbal-Medicine-Sentiment

中药情感分析数据集 - 数据说明书 Chinese Herbal Medicine Sentiment Analysis Dataset - Datacard 数据集概述 / Dataset Overview 基本信息 / Basic Information 数据集名称 / Dataset Name: Chinese Herbal Medicine Sentiment Analysis Dataset 版本 / Version: 1.0.0 创建日期 / Created: 2025-08-26 作者 / Author: Xingqiang Chen 许可证 / License: MIT 语言 / Language: 中文 (Chinese) 领域 / Domain: 中药 / 传统中医药 (Traditional Chinese Medicine) 数据规模 / Data Scale 总样本数 / Total Samples:… See the full description on the dataset page: https://huggingface.co/datasets/OpenModels/Chinese-Herbal-Medicine-Sentiment.

sourceHugging Facemitupdated 1y agoView on Hugging Face
2likes56downloads
Dataset Card

中药情感分析数据集 - 数据说明书

Chinese Herbal Medicine Sentiment Analysis Dataset - Datacard

数据集概述 / Dataset Overview

基本信息 / Basic Information

  • —数据集名称 / Dataset Name: Chinese Herbal Medicine Sentiment Analysis Dataset
  • —版本 / Version: 1.0.0
  • —创建日期 / Created: 2025-08-26
  • —作者 / Author: Xingqiang Chen
  • —许可证 / License: MIT
  • —语言 / Language: 中文 (Chinese)
  • —领域 / Domain: 中药 / 传统中医药 (Traditional Chinese Medicine)

数据规模 / Data Scale

  • —总样本数 / Total Samples: 234,879
  • —唯一产品数 / Unique Products: 259
  • —唯一用户数 / Unique Users: 210,749
  • —时间跨度 / Time Span: 14.5 年 / years (2010-01-13 20:22:34 至 / to 2024-07-02 19:54:44)

数据内容 / Data Content

情感分布 / Sentiment Distribution

情感类别 / Sentiment数量 / Count百分比 / Percentage
正面 / Positive178,01475.8%
中性 / Neutral27,02311.5%
负面 / Negative29,84212.7%

评分分布 / Rating Distribution

评分 / Rating数量 / Count百分比 / Percentage
1 星 / stars29,84212.7%
2 星 / stars7,5543.2%
3 星 / stars19,4698.3%
4 星 / stars1,9530.8%
5 星 / stars176,06175.0%

文本统计 / Text Statistics

  • —平均长度 / Average Length: 42.4 字符 / characters
  • —中位数长度 / Median Length: 27 字符 / characters
  • —最短长度 / Minimum Length: 1 字符 / characters
  • —最长长度 / Maximum Length: 563 字符 / characters
  • —总字符数 / Total Characters: 9,966,582

产品统计 / Product Statistics

  • —每个产品的平均评论数 / Average Reviews per Product: 906.9
  • —每个产品的评论数中位数 / Median Reviews per Product: 1018
  • —单个产品最少评论数 / Minimum Reviews per Product: 1
  • —单个产品最多评论数 / Maximum Reviews per Product: 3030

数据结构 / Data Structure

字段说明 / Field Descriptions

字段名 / Field Name类型 / Type描述 / Description示例 / Example
usernamestring匿名化的用户名 / Anonymized username"用***客"
user_idinteger唯一用户标识符 / Unique user identifier16788761848
review_textstring中文评论内容 / Chinese review content"产品质量很好,效果明显"
review_timedatetime评论发布时间 / Review timestamp"2021-12-09 12:56:37"
ratinginteger评分 (1-5分) / Rating (1-5 scale)5
product_idstring产品唯一标识符 / Product identifier"100001642346"
sentiment_labelstring情感标签 / Sentiment label"positive", "neutral", "negative"
source_filestring原始数据文件名 / Source file name"100001642346-好评.xls"

数据格式 / Data Format

  • —文件格式 / File Format: CSV (UTF-8 encoding)
  • —分隔符 / Delimiter: 逗号 / Comma (,)
  • —缺失值 / Missing Values: 无 / None (所有字段都有值 / All fields have values)

数据收集 / Data Collection

来源 / Source

  • —平台 / Platform: 中国电商平台 / Chinese e-commerce platforms
  • —收集时间 / Collection Period: 2010-2024
  • —收集方法 / Collection Method: 网络爬虫 / Web scraping

数据质量 / Data Quality

  • —完整性 / Completeness: 100% (无缺失值 / No missing values)
  • —一致性 / Consistency: 高 / High (统一的数据格式和编码 / Unified format and encoding)
  • —准确性 / Accuracy: 高 / High (原始用户评论数据 / Original user review data)

数据预处理 / Data Preprocessing

  1. 1.文本清理 / Text Cleaning:
  2. 2.去除空白评论 / Remove empty reviews
  3. 3.统一编码格式 / Standardize encoding
  4. 4.过滤无效内容 / Filter invalid content
  1. 1.情感标注 / Sentiment Labeling:
  2. 2.基于平台原始分类 / Based on platform original classification
  3. 3.好评 → positive / 中评 → neutral / 差评 → negative
  1. 1.数据验证 / Data Validation:
  2. 2.检查数据类型 / Check data types
  3. 3.验证时间格式 / Validate time format
  4. 4.确保情感标签一致性 / Ensure sentiment label consistency

使用案例 / Use Cases

适用场景 / Suitable Applications

  1. 1.情感分析研究 / Sentiment Analysis Research
  2. 2.中文文本情感分类 / Chinese text sentiment classification
  3. 3.情感分析模型训练 / Sentiment analysis model training
  4. 4.跨领域情感分析 / Cross-domain sentiment analysis
  1. 1.自然语言处理 / Natural Language Processing
  2. 2.中文文本理解 / Chinese text understanding
  3. 3.文本分类任务 / Text classification tasks
  4. 4.语言模型微调 / Language model fine-tuning
  1. 1.中医药研究 / Traditional Chinese Medicine Research
  2. 2.用户满意度分析 / User satisfaction analysis
  3. 3.产品质量评估 / Product quality assessment
  4. 4.市场反馈分析 / Market feedback analysis
  1. 1.商业智能 / Business Intelligence
  2. 2.客户意见挖掘 / Customer opinion mining
  3. 3.产品改进建议 / Product improvement suggestions
  4. 4.竞争分析 / Competitive analysis

基准任务 / Benchmark Tasks

  • —三分类情感分析 / 3-class Sentiment Classification: positive, neutral, negative
  • —五分类评分预测 / 5-class Rating Prediction: 1-5 stars
  • —文本-情感对齐 / Text-Sentiment Alignment: 评论内容与情感标签的对应关系

技术规范 / Technical Specifications

系统要求 / System Requirements

python
# Python 依赖 / Dependencies
pandas >= 1.3.0
datasets >= 2.0.0
transformers >= 4.20.0
torch >= 1.10.0  # 可选 / Optional
tensorflow >= 2.8.0  # 可选 / Optional

加载方式 / Loading Methods

1. 使用 Hugging Face Datasets
python
from datasets import load_dataset

# 加载完整数据集 / Load full dataset
dataset = load_dataset("xingqiang/chinese-herbal-medicine-sentiment")

# 访问训练集和验证集 / Access train and validation sets
train_data = dataset['train']
val_data = dataset['validation']

# 查看数据样例 / View data sample
print(train_data[0])
2. 使用 Pandas
python
import pandas as pd

# 从 CSV 文件加载 / Load from CSV
df = pd.read_csv("chinese_herbal_sentiment.csv")

# 查看基本信息 / View basic info
print(df.info())
print(df.head())

数据分割 / Data Splits

  • —训练集 / Training Set: 90% (211,391 样本 / samples)
  • —验证集 / Validation Set: 10% (23,487 样本 / samples)
  • —分割方式 / Split Method: 随机分割 / Random split (seed=42)

伦理考虑 / Ethical Considerations

隐私保护 / Privacy Protection

  • —用户隐私 / User Privacy: 所有用户名已匿名化处理 / All usernames are anonymized
  • —个人信息 / Personal Information: 不含任何个人身份信息 / No personal identifying information
  • —数据脱敏 / Data Desensitization: 保留分析价值同时保护用户隐私 / Preserve analytical value while protecting privacy

使用限制 / Usage Restrictions

  • —学术研究 / Academic Research: 鼓励用于学术研究和教育 / Encouraged for academic research and education
  • —商业用途 / Commercial Use: 遵循 MIT 许可证条款 / Follow MIT license terms
  • —数据再分发 / Data Redistribution: 允许在保持归属的情况下再分发 / Allowed with proper attribution

潜在偏见 / Potential Biases

  • —时间偏见 / Temporal Bias: 数据跨越多年,可能存在时间相关的偏见 / Data spans multiple years, potential temporal biases
  • —平台偏见 / Platform Bias: 来自特定电商平台,可能不代表整体市场 / From specific e-commerce platforms, may not represent overall market
  • —产品偏见 / Product Bias: 仅包含中药产品,情感表达可能具有领域特性 / Only includes herbal medicine products, sentiment expressions may be domain-specific

质量保证 / Quality Assurance

数据验证 / Data Validation

  • —✅ 无重复记录 / No duplicate records
  • —✅ 无缺失值 / No missing values
  • —✅ 时间格式一致 / Consistent time format
  • —✅ 情感标签有效 / Valid sentiment labels
  • —✅ 文本编码正确 / Correct text encoding

统计检查 / Statistical Checks

  • —✅ 情感分布合理 / Reasonable sentiment distribution
  • —✅ 评分与情感标签对应 / Rating-sentiment correspondence
  • —✅ 时间分布连续 / Continuous temporal distribution
  • —✅ 产品覆盖充分 / Sufficient product coverage

版本历史 / Version History

v1.0.0 (2024-08-26)

  • —初始发布 / Initial release
  • —包含 234,879 条评论数据 / Contains 234,879 reviews
  • —支持三分类情感分析任务 / Supports 3-class sentiment analysis task

引用方式 / Citation

如果您在研究中使用了此数据集,请引用: If you use this dataset in your research, please cite:

bibtex
@dataset{chinese_herbal_sentiment_2024,
  title={Chinese Herbal Medicine Sentiment Analysis Dataset},
  author={Chen, Xingqiang},
  year={2024},
  version={1.0.0},
  url={https://huggingface.co/datasets/xingqiang/chinese-herbal-medicine-sentiment},
  note={A comprehensive sentiment analysis dataset for Traditional Chinese Medicine product reviews}
}

联系方式 / Contact

  • —数据集维护者 / Dataset Maintainer: Xingqiang Chen
  • —Hugging Face: xingqiang
  • —问题反馈 / Issue Reports: 请在 Hugging Face 数据集页面提交 / Please submit on the Hugging Face dataset page

致谢 / Acknowledgments

感谢所有提供评论数据的用户,以及中医药电商平台提供的数据基础。 Thanks to all users who provided review data and the e-commerce platforms for the data foundation.


最后更新 / Last Updated: 2025-08-26 02:50:03 数据集大小 / Dataset Size: ~9.5 MB (文本内容 / text content)