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:
| 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` | |