Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Languages:
Chinese
Size:
10K - 100K
License:
|
Download README.md from left0ver/sentiment-classification: direct link, hf CLI and curl.
- Browser
- Download file 1.59 kB
-
https://huggingface.co/datasets/left0ver/sentiment-classification/resolve/main/README.md
- Command line
-
hf download hf://datasets/left0ver/sentiment-classification/README.md
-
curl -L -o README.md https://huggingface.co/datasets/left0ver/sentiment-classification/resolve/main/README.md
1.59 kB
| dataset_info: | |
| features: | |
| - name: text | |
| dtype: string | |
| - name: label | |
| dtype: int32 | |
| splits: | |
| - name: train | |
| num_bytes: 3065685 | |
| num_examples: 9146 | |
| - name: validation | |
| num_bytes: 380217 | |
| num_examples: 1200 | |
| download_size: 2483947 | |
| dataset_size: 3445902 | |
| configs: | |
| - config_name: default | |
| data_files: | |
| - split: train | |
| path: data/train-* | |
| - split: validation | |
| path: data/validation-* | |
| license: mit | |
| task_categories: | |
| - text-classification | |
| language: | |
| - zh | |
| size_categories: | |
| - n<1K | |
| # Introduction | |
| 这是一个情感分类的数据集,来源[飞桨](https://aistudio.baidu.com/datasetdetail/221537)。做了一些简单的处理,在此数据集上对bert微调的模型为[left0ver/bert-base-chinese-finetune-sentiment-classification](https://huggingface.co/left0ver/bert-base-chinese-finetune-sentiment-classification) | |
| 因为bert最高只支持512长度的输入,因为对长度超500的样本使用了滑动窗口的办法进行了拆分,推理的时候,若是拆分出来的样本,则分别对这几个样本进行预测,取概率最大的作为最终的预测结果。具体可以看[BERT模型输入长度超过512如何解决?](https://zhuanlan.zhihu.com/p/493424507) | |
| 有关滑动窗口的版本的数据集请访问https://huggingface.co/datasets/left0ver/sentiment-classification/tree/window_version | |
| # Usage | |
| 使用普通版本: | |
| ```python | |
| dataset = load_dataset("left0ver/sentiment-classification") | |
| ``` | |
| 使用滑动窗口版本 | |
| ```python | |
| dataset = load_dataset("left0ver/sentiment-classification",revision="window_version") | |
| ``` | |