File size: 5,486 Bytes
241c154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
---

license: cc-by-nc-4.0
task_categories:
- text-classification
- sentence-similarity
task_ids:
- semantic-similarity-classification
language:
- zh
multilinguality:
- monolingual
size_categories:
- 100K<n<1M
pretty_name: CCPM (Pair Classification)
tags:
- poetry
- pair-classification
- classical-chinese
- chinese-poetry
- retrieval
- mteb
- poetrymteb
- semantic-similarity
annotations_creators:
- derived
source_datasets:
- original
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: validation
    path: data/validation-*
  - split: test
    path: data/test-*
  default: true
dataset_info:
- config_name: default
  features:
  - name: id
    dtype: string
  - name: sentence1
    dtype: string
  - name: sentence2
    dtype: string
  - name: labels
    dtype: int64
  splits:
  - name: train
    num_bytes: 4774437
    num_examples: 87112
  - name: validation
    num_bytes: 596643
    num_examples: 10880
  - name: test
    num_bytes: 596741
    num_examples: 10880
  download_size: 5967821
  dataset_size: 5967821
---


# CCPM — Pair Classification (PoetryMTEB)

Chinese Classical Poetry Matching Dataset (**CCPM**), reformatted as an **MTEB-style Pair Classification** task for PoetryMTEB embedding evaluation.

Upstream source: [CCPM](https://arxiv.org/abs/2106.01979) (Li et al., 2021). Original task: given a modern Chinese description, select the matching classical poetry line from four candidates.

---

## Dataset Card

| Item | Description |
|------|-------------|
| **Source** | CCPM — Chinese Classical Poetry Matching Dataset ([Li et al., 2021](https://arxiv.org/abs/2106.01979)) |
| **Languages** | Chinese (`zh`): modern Chinese description ↔ classical poetry line |
| **Size** | 108,872 labeled pairs (train 87,112; validation 10,880; test 10,880). Derived from 21,778 / 2,720 / 2,720 original MCQ instances (×4 choices) |
| **Label type** | Binary pair label: `labels=1` (semantic match), `labels=0` (hard negative) |
| **Splits** | `train` ← original train; `validation` / `test` ← original validation (see note below) |
| **Construction** | Expand each 4-way MCQ into 4 pairs `(sentence1=translation, sentence2=choice)` |
| **License** | [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) (PoetryMTEB redistribution; please cite original authors) |
| **Evaluation metrics** | MTEB Pair Classification: **Average Precision (AP)**, accuracy / F1 at best similarity threshold (cosine / Euclidean / Manhattan). Original CCPM MCQ metric: **Accuracy** |

> **Split note:** The public `test_public.jsonl` in the original release has **no gold answers**. For Pair Classification we use the original **validation** set as both `validation` and `test` (identical labeled pairs) so MTEB-style evaluators that read `test` can run. Do not treat train→test leakage across these two identical eval splits.



---



## Features



| Field | Type | Description |

|-------|------|-------------|

| `id` | `string` | Unique pair id |

| `sentence1` | `string` | Modern Chinese description (`translation`) |

| `sentence2` | `string` | Classical poetry line candidate (`choice`) |

| `labels` | `int64` | `1` = matching pair; `0` = non-matching (hard negative) |



Schema aligns with MTEB Pair Classification (`sentence1`, `sentence2`, `labels`).



---



## Construction method



1. **Upstream CCPM** builds each instance from classical–modern parallel poetry: the gold line is the correct choice; three distractors are retrieved as similar lines from a classical poetry corpus (hard negatives).

2. **This release** converts each MCQ instance into four binary pairs:



```text

for choice_i in choices:
    sentence1 = translation

    sentence2 = choice_i

    labels    = 1 if i == answer else 0

```


Class balance per split: **1 positive : 3 negatives**.

---

## Size by split

| Split | #pairs | #positive (`labels=1`) | #negative (`labels=0`) | Origin |
|-------|-------:|-----------------------:|-----------------------:|--------|
| train | 87,112 | 21,778 | 65,334 | original train (21,778×4) |
| validation | 10,880 | 2,720 | 8,160 | original valid (2,720×4) |
| test | 10,880 | 2,720 | 8,160 | same as validation (see note) |

---

## Evaluation metrics

**PoetryMTEB / MTEB Pair Classification**

| Metric | Role |
|--------|------|
| Average Precision (AP) | Ranking quality of pair similarity scores |
| Accuracy / F1 | Binary decision at best threshold over cosine / distance scores |

**Original CCPM (4-way matching)** used Accuracy over candidate indices.

---

## How to load

```python

from datasets import load_dataset



ds = load_dataset("PoetryMTEB/CCPM")

print(ds)

print(ds["test"][0])

# {'id': '...', 'sentence1': '...', 'sentence2': '...', 'labels': 0 or 1}

```

---

## License

Distributed under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/).  
Please cite the original CCPM paper when using this data.

---

## Citation

```bibtex

@article{li2021CCPM,

  title = {CCPM: A Chinese Classical Poetry Matching Dataset},

  author = {Li, Wenhao and Qi, Fanchao and Sun, Maosong and Yi, Xiaoyuan and Zhang, Jiarui},

  journal = {arXiv preprint arXiv:2106.01979},

  year = {2021},

  url = {https://arxiv.org/abs/2106.01979}

}

```

This Hub dataset: `PoetryMTEB/CCPM` (Pair Classification packaging for PoetryMTEB).