Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
multi-class-classification
Languages:
Arabic
Size:
10K - 100K
ArXiv:
Tags:
poetry
arabic
text-classification
genre-classification
meter-classification
era-classification
License:
File size: 7,254 Bytes
36b286a | 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 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | ---
license: apache-2.0
task_categories:
- text-classification
task_ids:
- multi-class-classification
language:
- ar
multilinguality:
- monolingual
size_categories:
- 1K<n<10K
pretty_name: FannOrFlopClassification
tags:
- poetry
- arabic
- text-classification
- genre-classification
- meter-classification
- era-classification
- mteb
- poetrymteb
- embedding-evaluation
annotations_creators:
- expert-generated
source_datasets:
- omkarthawakar/FannOrFlop
configs:
- config_name: genre
data_files:
- split: train
path: genre/train-*
- split: validation
path: genre/validation-*
- split: test
path: genre/test-*
default: true
- config_name: meter
data_files:
- split: train
path: meter/train-*
- split: validation
path: meter/validation-*
- split: test
path: meter/test-*
- config_name: era
data_files:
- split: train
path: era/train-*
- split: validation
path: era/validation-*
- split: test
path: era/test-*
dataset_info:
- config_name: genre
features:
- name: id
dtype: string
- name: title
dtype: string
- name: author
dtype: string
- name: poem
dtype: string
- name: label
dtype: int64
- name: label_name
dtype: string
splits:
- name: train
num_examples: 5176
- name: validation
num_examples: 657
- name: test
num_examples: 1106
- config_name: meter
features:
- name: id
dtype: string
- name: title
dtype: string
- name: author
dtype: string
- name: poem
dtype: string
- name: label
dtype: int64
- name: label_name
dtype: string
splits:
- name: train
num_examples: 5176
- name: validation
num_examples: 657
- name: test
num_examples: 1106
- config_name: era
features:
- name: id
dtype: string
- name: title
dtype: string
- name: author
dtype: string
- name: poem
dtype: string
- name: label
dtype: int64
- name: label_name
dtype: string
splits:
- name: train
num_examples: 5176
- name: validation
num_examples: 657
- name: test
num_examples: 1106
---
# FannOrFlopClassification
Single-label **Arabic poetry classification** for PoetryMTEB embedding evaluation, derived from [Fann or Flop](https://huggingface.co/datasets/omkarthawakar/FannOrFlop) (EMNLP 2025).
Three configs share the **same poems and the same poet-aware train/validation/test split**:
| Config | Task | #classes |
|--------|------|---------:|
| `genre` | poetic genre / theme | 14 |
| `meter` | poetic meter (ʿarūḍ) | 19 |
| `era` | historical era | 12 |
## Dataset Card
| Item | Description |
|------|-------------|
| **Source** | [omkarthawakar/FannOrFlop](https://huggingface.co/datasets/omkarthawakar/FannOrFlop); paper [arXiv:2505.18152](https://arxiv.org/abs/2505.18152) |
| **Languages** | Arabic (`ar`) |
| **Size** | train=5176; validation=657; test=1106 (after filtering) |
| **Filtering** | Removed poems with unlabeled meter `غير محدد` (n=45). Raw=6984 → kept=6939. |
| **Label type** | Single-label multiclass (`label` int + `label_name` string) |
| **Splits** | Poet-aware ~8:1:1 (`train` / `validation` / `test`), **shared across configs** |
| **License** | [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) (same as upstream) |
| **Evaluation metrics** | Classification on embeddings: **accuracy**, **macro/weighted F1** |
---
## Features
| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Upstream poem id |
| `title` | string | Poem title |
| `author` | string | Poet name |
| `poem` | string | Poem body (verse index lines removed) |
| `label` | int64 | Class index (0 … C−1) |
| `label_name` | string | Arabic class name |
Label inventories: `label_taxonomy.json`.
---
## Label inventories (all splits pooled)
### genre
| id | name | count |
|---:|------|------:|
| 0 | مدح | 1354 |
| 1 | غزل | 894 |
| 2 | هجاء | 872 |
| 3 | حكمه | 705 |
| 4 | عامه | 609 |
| 5 | عتاب | 601 |
| 6 | رثاء | 466 |
| 7 | فراق | 458 |
| 8 | سياسية | 261 |
| 9 | دينية | 244 |
| 10 | شوق | 211 |
| 11 | اعتذار | 106 |
| 12 | صبر | 97 |
| 13 | حزينة | 61 |
### meter
| id | name | count |
|---:|------|------:|
| 0 | الطويل | 1791 |
| 1 | الكامل | 1298 |
| 2 | البسيط | 892 |
| 3 | الوافر | 783 |
| 4 | الخفيف | 533 |
| 5 | السريع | 329 |
| 6 | المتقارب | 303 |
| 7 | الرمل | 297 |
| 8 | الرجز | 289 |
| 9 | المنسرح | 202 |
| 10 | المجتث | 87 |
| 11 | الهزج | 80 |
| 12 | المديد | 35 |
| 13 | المتدارك | 5 |
| 14 | الدوبيت | 4 |
| 15 | موشح | 4 |
| 16 | المقتضب | 3 |
| 17 | المواليا | 3 |
| 18 | المضارع | 1 |
### era
| id | name | count |
|---:|------|------:|
| 0 | العصر العباسي | 2342 |
| 1 | العصر الحديث | 699 |
| 2 | العصر الأموي | 556 |
| 3 | المغرب والأندلس | 446 |
| 4 | الدولة الايوبية | 413 |
| 5 | الدولة الفاطمية | 409 |
| 6 | الدولة المملوكية | 408 |
| 7 | قبل الإسلام | 368 |
| 8 | الشعراء المخضرمون | 361 |
| 9 | العصر العثماني | 326 |
| 10 | عصر بين الدولتين | 321 |
| 11 | العصر الإسلامي | 290 |
---
## Construction method
1. Load [omkarthawakar/FannOrFlop](https://huggingface.co/datasets/omkarthawakar/FannOrFlop).
2. Drop poems whose `meter` is `غير محدد` (unlabeled).
3. Normalize `poem_verses` into `poem` (strip numeric verse indices).
4. Build frequency-ordered label vocabularies for `genre`, `meter`, `era`.
5. Poet-aware split ≈ 80% / 10% / 10%; reuse the same split for all three configs.
---
## How to load
```python
from datasets import load_dataset
genre = load_dataset("PoetryMTEB/FannOrFlopClassification", "genre")
meter = load_dataset("PoetryMTEB/FannOrFlopClassification", "meter")
era = load_dataset("PoetryMTEB/FannOrFlopClassification", "era")
print(genre["test"][0]["title"], genre["test"][0]["label_name"])
```
For embedding evaluation, encode `poem` (optionally prepend `title`), then train a linear / MLP classifier on `label`.
---
## License
Distributed under **Apache License 2.0**, consistent with the upstream FannOrFlop release.
---
## Citation / provenance
```bibtex
@inproceedings{alghallabi-etal-2025-fann,
title = {{Fann or Flop: A Multigenre, Multiera Benchmark for Arabic Poetry Understanding in LLMs}},
author = {{Alghallabi, Wafa and Thawkar, Ritesh and Ghaboura, Sara and More, Ketan and Thawakar, Omkar and Cholakkal, Hisham and Khan, Salman and Anwer, Rao Muhammad}},
booktitle = {{Proceedings of EMNLP 2025}},
year = {{2025}},
url = {{https://arxiv.org/abs/2505.18152}},
}
```
- Upstream dataset: [https://huggingface.co/datasets/omkarthawakar/FannOrFlop](https://huggingface.co/datasets/omkarthawakar/FannOrFlop)
- This Hub packaging: `PoetryMTEB/FannOrFlopClassification`
|