Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
multi-class-classification
Languages:
Chinese
Size:
1K - 10K
License:
Improve TCCP Dataset Card + schema (poem/label) + dataset_infos.yaml
Browse files- README.md +157 -46
- data/test-00000-of-00001.parquet +2 -2
- data/train-00000-of-00001.parquet +2 -2
- data/validation-00000-of-00001.parquet +2 -2
- dataset_infos.yaml +39 -0
- label_taxonomy.json +98 -0
README.md
CHANGED
|
@@ -1,46 +1,157 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: cc-by-4.0
|
| 3 |
-
task_categories:
|
| 4 |
-
- text-classification
|
| 5 |
-
|
| 6 |
-
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-classification
|
| 5 |
+
task_ids:
|
| 6 |
+
- multi-class-classification
|
| 7 |
+
language:
|
| 8 |
+
- zh
|
| 9 |
+
multilinguality:
|
| 10 |
+
- monolingual
|
| 11 |
+
size_categories:
|
| 12 |
+
- 1K<n<10K
|
| 13 |
+
pretty_name: TCCP (Tang Chinese Classical Poetry Theme Classification)
|
| 14 |
+
tags:
|
| 15 |
+
- poetry
|
| 16 |
+
- chinese
|
| 17 |
+
- classical-chinese
|
| 18 |
+
- tang-poetry
|
| 19 |
+
- theme-classification
|
| 20 |
+
- multi-class-classification
|
| 21 |
+
- mteb
|
| 22 |
+
- poetrymteb
|
| 23 |
+
- embedding-evaluation
|
| 24 |
+
annotations_creators:
|
| 25 |
+
- expert-generated
|
| 26 |
+
source_datasets:
|
| 27 |
+
- shuizhonghaitong/classification_GAT
|
| 28 |
+
configs:
|
| 29 |
+
- config_name: default
|
| 30 |
+
data_files:
|
| 31 |
+
- split: train
|
| 32 |
+
path: data/train-*
|
| 33 |
+
- split: validation
|
| 34 |
+
path: data/validation-*
|
| 35 |
+
- split: test
|
| 36 |
+
path: data/test-*
|
| 37 |
+
default: true
|
| 38 |
+
dataset_info:
|
| 39 |
+
- config_name: default
|
| 40 |
+
features:
|
| 41 |
+
- name: id
|
| 42 |
+
dtype: string
|
| 43 |
+
- name: title
|
| 44 |
+
dtype: string
|
| 45 |
+
- name: poem
|
| 46 |
+
dtype: string
|
| 47 |
+
- name: label
|
| 48 |
+
dtype: int64
|
| 49 |
+
- name: label_name
|
| 50 |
+
dtype: string
|
| 51 |
+
- name: keywords
|
| 52 |
+
sequence: string
|
| 53 |
+
splits:
|
| 54 |
+
- name: train
|
| 55 |
+
num_examples: 2804
|
| 56 |
+
- name: validation
|
| 57 |
+
num_examples: 159
|
| 58 |
+
- name: test
|
| 59 |
+
num_examples: 243
|
| 60 |
+
---
|
| 61 |
+
|
| 62 |
+
# TCCP — Tang Chinese Classical Poetry Theme Classification
|
| 63 |
+
|
| 64 |
+
Multi-class **theme classification** of **Tang-dynasty classical Chinese poetry** for PoetryMTEB embedding evaluation.
|
| 65 |
+
|
| 66 |
+
Upstream TCCP provides poem texts with expert/curated **theme** labels and keyword lists, originally used for graph-attention theme classification ([classification_GAT](https://github.com/shuizhonghaitong/classification_GAT)).
|
| 67 |
+
|
| 68 |
+
## Dataset Card
|
| 69 |
+
|
| 70 |
+
| Item | Description |
|
| 71 |
+
|------|-------------|
|
| 72 |
+
| **Source** | [shuizhonghaitong/classification_GAT](https://github.com/shuizhonghaitong/classification_GAT) (TCCP) |
|
| 73 |
+
| **Paper** | 刘昱彤, 吴斌, 白婷. 古诗词图谱的构建及分析研究[J]. *计算机研究与发展*, 2020, 57(6): 1252-1268 |
|
| 74 |
+
| **Languages** | Classical Chinese / Chinese (`zh`) |
|
| 75 |
+
| **Unit** | Full poem text (`poem`) |
|
| 76 |
+
| **Labels** | Single-label **9** themes (思乡 / 送别 / 战争 / …) |
|
| 77 |
+
| **Size** | train=2804; validation=159; test=243; **total=3206** |
|
| 78 |
+
| **Splits** | Preserved from the previous PoetryMTEB/TCCP release (train / validation / test) |
|
| 79 |
+
| **License** | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (PoetryMTEB redistribution; cite original authors) |
|
| 80 |
+
| **Evaluation metrics** | Embedding classification: **accuracy**, **macro/micro F1**. Upstream GAT paper reports theme-classification accuracy. |
|
| 81 |
+
|
| 82 |
+
> **Note on size:** The upstream GitHub README mentions ~3,247 poems; this Hub packaging contains **3206** labeled poems after cleaning/split alignment of the prior PoetryMTEB release.
|
| 83 |
+
|
| 84 |
+
## Label taxonomy (9)
|
| 85 |
+
|
| 86 |
+
| id | label_name | name_en | train | validation | test | total |
|
| 87 |
+
|---:|------------|---------|------:|-----------:|-----:|------:|
|
| 88 |
+
| 0 | `思乡` | Homesickness | 596 | 28 | 31 | 655 |
|
| 89 |
+
| 1 | `送别` | Farewell | 565 | 30 | 42 | 637 |
|
| 90 |
+
| 2 | `战争` | War | 546 | 26 | 34 | 606 |
|
| 91 |
+
| 3 | `怀人` | Longing for someone | 447 | 15 | 7 | 469 |
|
| 92 |
+
| 4 | `田园` | Pastoral | 168 | 12 | 19 | 199 |
|
| 93 |
+
| 5 | `山水` | Landscape | 136 | 8 | 14 | 158 |
|
| 94 |
+
| 6 | `咏物` | Object chanting | 119 | 11 | 28 | 158 |
|
| 95 |
+
| 7 | `闺怨` | Boudoir lament | 114 | 12 | 29 | 155 |
|
| 96 |
+
| 8 | `怀古` | Historical reflection | 113 | 17 | 39 | 169 |
|
| 97 |
+
|
| 98 |
+
Codebook: `label_taxonomy.json`.
|
| 99 |
+
|
| 100 |
+
## Features
|
| 101 |
+
|
| 102 |
+
| Field | Type | Description |
|
| 103 |
+
|-------|------|-------------|
|
| 104 |
+
| `id` | string | Example id (`tccp-{split}-{idx}`) |
|
| 105 |
+
| `title` | string | Poem title |
|
| 106 |
+
| `poem` | string | **Classification input**: full poem body (formerly `text`) |
|
| 107 |
+
| `label` | int64 | Theme class id (0–8) |
|
| 108 |
+
| `label_name` | string | Theme name in Chinese (formerly `theme_label`) |
|
| 109 |
+
| `keywords` | list[string] | Keyword list associated with the poem |
|
| 110 |
+
|
| 111 |
+
Schema aligns with other PoetryMTEB classification datasets (`id`, `poem`, `label`, `label_name`).
|
| 112 |
+
|
| 113 |
+
## Construction method
|
| 114 |
+
|
| 115 |
+
1. Load the existing `PoetryMTEB/TCCP` parquet splits.
|
| 116 |
+
2. Rename/normalize fields: `text`→`poem`, `theme_label`→`label_name` + integer `label`.
|
| 117 |
+
3. Keep upstream `title` and `keywords`; assign stable ids.
|
| 118 |
+
4. Write PoetryMTEB parquet shards + `dataset_infos.yaml` + Dataset Card.
|
| 119 |
+
|
| 120 |
+
No re-split was performed in this packaging pass (split sizes preserved for continuity with prior PoetryMTEB experiments).
|
| 121 |
+
|
| 122 |
+
## How to load
|
| 123 |
+
|
| 124 |
+
```python
|
| 125 |
+
from datasets import load_dataset
|
| 126 |
+
|
| 127 |
+
ds = load_dataset("PoetryMTEB/TCCP")
|
| 128 |
+
print(ds["train"][0]["poem"][:80])
|
| 129 |
+
print(ds["train"][0]["label_name"], ds["train"][0]["label"])
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
+
## Intended use
|
| 133 |
+
|
| 134 |
+
- PoetryMTEB / MTEB-style **multi-class classification** probing of classical Chinese poem embeddings (theme recognition).
|
| 135 |
+
- Literary / DH analyses of Tang poetry themes.
|
| 136 |
+
|
| 137 |
+
## Citation
|
| 138 |
+
|
| 139 |
+
```bibtex
|
| 140 |
+
@article{liu2020gushi,
|
| 141 |
+
title = {古诗词图谱的构建及分析研究},
|
| 142 |
+
author = {刘昱彤 and 吴斌 and 白婷},
|
| 143 |
+
journal = {计算机研究与发展},
|
| 144 |
+
volume = {57},
|
| 145 |
+
number = {6},
|
| 146 |
+
pages = {1252--1268},
|
| 147 |
+
year = {2020}
|
| 148 |
+
}
|
| 149 |
+
```
|
| 150 |
+
|
| 151 |
+
Upstream code/data release: [https://github.com/shuizhonghaitong/classification_GAT](https://github.com/shuizhonghaitong/classification_GAT)
|
| 152 |
+
|
| 153 |
+
This Hub packaging: `PoetryMTEB/TCCP`
|
| 154 |
+
|
| 155 |
+
## License
|
| 156 |
+
|
| 157 |
+
Distributed under **CC BY 4.0** for this PoetryMTEB packaging. Please cite the original paper and GitHub repository when using the data.
|
data/test-00000-of-00001.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:18d155ba9266dac7154c9e0af9f7bc9f3adf3867eb35b71ca9c15df1dcf63877
|
| 3 |
+
size 52423
|
data/train-00000-of-00001.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c0829a72fa585cc2bdafcd50e5ffc2cb6f7578e79682e7b7dd8cf53dc471450d
|
| 3 |
+
size 1074015
|
data/validation-00000-of-00001.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:89a3443b46170ada457aaf62244a4253681a636cad67b385ce3fdd03390cbd60
|
| 3 |
+
size 72391
|
dataset_infos.yaml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
configs:
|
| 2 |
+
- config_name: default
|
| 3 |
+
data_files:
|
| 4 |
+
- path: data/train-*.parquet
|
| 5 |
+
split: train
|
| 6 |
+
- path: data/validation-*.parquet
|
| 7 |
+
split: validation
|
| 8 |
+
- path: data/test-*.parquet
|
| 9 |
+
split: test
|
| 10 |
+
default: true
|
| 11 |
+
dataset_info:
|
| 12 |
+
configs:
|
| 13 |
+
- config_name: default
|
| 14 |
+
dataset_size: 1198829
|
| 15 |
+
download_size: 1198829
|
| 16 |
+
features:
|
| 17 |
+
- dtype: string
|
| 18 |
+
name: id
|
| 19 |
+
- dtype: string
|
| 20 |
+
name: title
|
| 21 |
+
- dtype: string
|
| 22 |
+
name: poem
|
| 23 |
+
- dtype: int64
|
| 24 |
+
name: label
|
| 25 |
+
- dtype: string
|
| 26 |
+
name: label_name
|
| 27 |
+
- sequence:
|
| 28 |
+
dtype: string
|
| 29 |
+
name: keywords
|
| 30 |
+
splits:
|
| 31 |
+
- name: train
|
| 32 |
+
num_bytes: 1074015
|
| 33 |
+
num_examples: 2804
|
| 34 |
+
- name: validation
|
| 35 |
+
num_bytes: 72391
|
| 36 |
+
num_examples: 159
|
| 37 |
+
- name: test
|
| 38 |
+
num_bytes: 52423
|
| 39 |
+
num_examples: 243
|
label_taxonomy.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"n_classes": 9,
|
| 3 |
+
"labels": [
|
| 4 |
+
{
|
| 5 |
+
"id": 0,
|
| 6 |
+
"name": "思乡",
|
| 7 |
+
"name_en": "Homesickness",
|
| 8 |
+
"name_zh": "思乡"
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"id": 1,
|
| 12 |
+
"name": "送别",
|
| 13 |
+
"name_en": "Farewell",
|
| 14 |
+
"name_zh": "送别"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"id": 2,
|
| 18 |
+
"name": "战争",
|
| 19 |
+
"name_en": "War",
|
| 20 |
+
"name_zh": "战争"
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"id": 3,
|
| 24 |
+
"name": "怀人",
|
| 25 |
+
"name_en": "Longing for someone",
|
| 26 |
+
"name_zh": "怀人"
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
"id": 4,
|
| 30 |
+
"name": "田园",
|
| 31 |
+
"name_en": "Pastoral",
|
| 32 |
+
"name_zh": "田园"
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"id": 5,
|
| 36 |
+
"name": "山水",
|
| 37 |
+
"name_en": "Landscape",
|
| 38 |
+
"name_zh": "山水"
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"id": 6,
|
| 42 |
+
"name": "咏物",
|
| 43 |
+
"name_en": "Object chanting",
|
| 44 |
+
"name_zh": "咏物"
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"id": 7,
|
| 48 |
+
"name": "闺怨",
|
| 49 |
+
"name_en": "Boudoir lament",
|
| 50 |
+
"name_zh": "闺怨"
|
| 51 |
+
},
|
| 52 |
+
{
|
| 53 |
+
"id": 8,
|
| 54 |
+
"name": "怀古",
|
| 55 |
+
"name_en": "Historical reflection",
|
| 56 |
+
"name_zh": "怀古"
|
| 57 |
+
}
|
| 58 |
+
],
|
| 59 |
+
"counts": {
|
| 60 |
+
"train": {
|
| 61 |
+
"战争": 546,
|
| 62 |
+
"怀古": 113,
|
| 63 |
+
"送别": 565,
|
| 64 |
+
"思乡": 596,
|
| 65 |
+
"咏物": 119,
|
| 66 |
+
"怀人": 447,
|
| 67 |
+
"闺怨": 114,
|
| 68 |
+
"田园": 168,
|
| 69 |
+
"山水": 136
|
| 70 |
+
},
|
| 71 |
+
"validation": {
|
| 72 |
+
"战争": 26,
|
| 73 |
+
"送别": 30,
|
| 74 |
+
"闺怨": 12,
|
| 75 |
+
"咏物": 11,
|
| 76 |
+
"怀古": 17,
|
| 77 |
+
"山水": 8,
|
| 78 |
+
"思乡": 28,
|
| 79 |
+
"田园": 12,
|
| 80 |
+
"怀人": 15
|
| 81 |
+
},
|
| 82 |
+
"test": {
|
| 83 |
+
"战争": 34,
|
| 84 |
+
"送别": 42,
|
| 85 |
+
"闺怨": 29,
|
| 86 |
+
"咏物": 28,
|
| 87 |
+
"怀古": 39,
|
| 88 |
+
"山水": 14,
|
| 89 |
+
"思乡": 31,
|
| 90 |
+
"田园": 19,
|
| 91 |
+
"怀人": 7
|
| 92 |
+
}
|
| 93 |
+
},
|
| 94 |
+
"source": {
|
| 95 |
+
"github": "https://github.com/shuizhonghaitong/classification_GAT",
|
| 96 |
+
"paper": "古诗词图谱的构建及分析研究"
|
| 97 |
+
}
|
| 98 |
+
}
|