Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
multi-label-classification
Languages:
English
Size:
10K - 100K
License:
File size: 5,583 Bytes
aaf3bf3 | 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 | ---
license: agpl-3.0
task_categories:
- text-classification
task_ids:
- multi-label-classification
language:
- en
multilinguality:
- monolingual
size_categories:
- 10K<n<100K
pretty_name: PoetryFoundationSubjectsClassification
tags:
- poetry
- multi-label-classification
- theme-classification
- subjects
- mteb
- poetrymteb
- embedding-evaluation
annotations_creators:
- derived
source_datasets:
- suayptalha/Poetry-Foundation-Poems
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: title
dtype: string
- name: author
dtype: string
- name: poem
dtype: string
- name: labels_l1
sequence: string
- name: labels_l2
sequence: string
- name: labels_l1_names
sequence: string
- name: labels_l2_names
sequence: string
splits:
- name: train
num_examples: 10259
- name: validation
num_examples: 1283
- name: test
num_examples: 1283
---
# PoetryFoundationSubjectsClassification
Multi-label **poetry subject / theme classification** dataset for PoetryMTEB embedding evaluation, derived from Poetry Foundation poem subjects.
## Dataset Card
| Item | Description |
|------|-------------|
| **Source** | [suayptalha/Poetry-Foundation-Poems](https://huggingface.co/datasets/suayptalha/Poetry-Foundation-Poems); subject taxonomy aligned with [Poetry Foundation Topics](https://www.poetryfoundation.org/topics) |
| **Languages** | English (`en`) |
| **Size** | train=10259; validation=1283; test=1283 (poems with ≥1 mapped subject) |
| **Label type** | Multi-label subjects at two granularities: L1 (coarse) and L2 (fine), with hierarchical codes |
| **Splits** | Poet-aware ~8:1:1 split (`train` / `validation` / `test`) |
| **Construction** | Parse original `Tags` → exclude occasions/holidays & emotion-like tags → alias to official subject names → assign `S{i}` / `S{i}-{j}` codes |
| **License** | [GNU Affero General Public License v3.0](https://www.gnu.org/licenses/agpl-3.0.html) (same family as the upstream HF dataset) |
| **Evaluation metrics** | Multi-label classification on embeddings: **macro/micro F1**, **Average Precision (AP)**; evaluate **L1 and L2 separately** |
---
## Features
| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Example id |
| `title` | string | Poem title |
| `author` | string | Poet name |
| `poem` | string | Poem body |
| `labels_l1` | list[string] | Coarse subject codes, e.g. `S1`, `S6` |
| `labels_l2` | list[string] | Fine subject codes with parent index, e.g. `S1-8`, `S6-6` |
| `labels_l1_names` | list[string] | Human-readable L1 names |
| `labels_l2_names` | list[string] | Human-readable paths `Parent/Child` |
Full codebook: `label_taxonomy.json`.
### L1 codes
| Code | Subject |
|------|---------|
| `S1` | Love |
| `S2` | Nature |
| `S3` | Social Commentaries |
| `S4` | History & Politics |
| `S5` | Religion |
| `S6` | Living |
| `S7` | Time & Brevity |
| `S8` | Relationships |
| `S9` | Activities |
| `S10` | Arts & Sciences |
| `S11` | Mythology & Folklore |
L2 codes are `S{i}-{j}` where `j` is the child index under that L1 (see taxonomy file). Example: `Living/Health & Illness` → `S6-6` (index depends on Living child order).
---
## Construction method
1. **Upstream text & tags** from [suayptalha/Poetry-Foundation-Poems](https://huggingface.co/datasets/suayptalha/Poetry-Foundation-Poems) (`Title`, `Poet`, `Poem`, `Tags`).
2. **Taxonomy** follows Poetry Foundation [Topics / Subjects](https://www.poetryfoundation.org/topics), with project adjustments:
- Occasions/holidays excluded
- Emotion-like `The Mind` / `Horror` excluded from subject labels
- `Health & Illness` placed under **Living**
- Dataset aliases (e.g. `Death`→`Death & Dying`, `First Love`→`New Love`)
- `Classic Love` kept as a Love L2 leaf
3. **Hierarchical codes**: L1=`S{i}`; L2=`S{i}-{j}` (parent index explicit in the L2 code).
4. **Split**: group by author, then allocate poet groups to train/validation/test ≈ 80%/10%/10%.
---
## Label statistics (all splits pooled)
| Level | #label types | notes |
|-------|-------------:|-------|
| L1 | 11 | codes in use |
| L2 | 71 | codes in use |
| Avg L1 / poem | 2.55 | |
| Avg L2 / poem | 2.27 | |
---
## How to load
```python
from datasets import load_dataset
ds = load_dataset("PoetryMTEB/PoetryFoundationSubjectsClassification")
print(ds["test"][0]["title"], ds["test"][0]["labels_l1"], ds["test"][0]["labels_l2_names"])
```
For embedding evaluation, encode `poem` (optionally prepend `title`), then train multi-label classifiers separately on `labels_l1` and `labels_l2`.
---
## License
Distributed under **GNU Affero General Public License v3.0 (AGPL-3.0)**, consistent with the upstream dataset license on Hugging Face.
---
## Citation / provenance
Please credit the upstream corpus and Poetry Foundation subject browsing structure:
- Dataset: [https://huggingface.co/datasets/suayptalha/Poetry-Foundation-Poems](https://huggingface.co/datasets/suayptalha/Poetry-Foundation-Poems)
- Subjects / topics: [https://www.poetryfoundation.org/topics](https://www.poetryfoundation.org/topics)
This Hub packaging: `PoetryMTEB/PoetryFoundationSubjectsClassification`.
|