Datasets:
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; subject taxonomy aligned with Poetry Foundation 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 (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
- Upstream text & tags from suayptalha/Poetry-Foundation-Poems (
Title,Poet,Poem,Tags). - Taxonomy follows Poetry Foundation Topics / Subjects, with project adjustments:
- Occasions/holidays excluded
- Emotion-like
The Mind/Horrorexcluded from subject labels Health & Illnessplaced under Living- Dataset aliases (e.g.
Death→Death & Dying,First Love→New Love) Classic Lovekept as a Love L2 leaf
- Hierarchical codes: L1=
S{i}; L2=S{i}-{j}(parent index explicit in the L2 code). - 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
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
- Subjects / topics: https://www.poetryfoundation.org/topics
This Hub packaging: PoetryMTEB/PoetryFoundationSubjectsClassification.