Datasets:
Tasks:
Text Classification
Formats:
parquet
Sub-tasks:
multi-class-classification
Languages:
Tamil
Size:
1K - 10K
License:
Add TamilSangamLiteraryDeviceClassification (8 merged devices; stratified train/test)
ee6df5b verified | license: other | |
| task_categories: | |
| - text-classification | |
| task_ids: | |
| - multi-class-classification | |
| language: | |
| - ta | |
| multilinguality: | |
| - monolingual | |
| size_categories: | |
| - 1K<n<10K | |
| pretty_name: TamilSangamLiteraryDeviceClassification | |
| tags: | |
| - poetry | |
| - tamil | |
| - sangam | |
| - literary-device | |
| - rhetoric | |
| - multi-class-classification | |
| - mteb | |
| - poetrymteb | |
| - embedding-evaluation | |
| annotations_creators: | |
| - expert-generated | |
| source_datasets: | |
| - Tamil-Sangam-Literature-Dataset | |
| configs: | |
| - config_name: default | |
| data_files: | |
| - split: train | |
| path: data/train-* | |
| - split: test | |
| path: data/test-* | |
| default: true | |
| dataset_info: | |
| - config_name: default | |
| features: | |
| - name: id | |
| dtype: string | |
| - name: line_number | |
| dtype: int64 | |
| - name: poem | |
| dtype: string | |
| - name: transliteration | |
| dtype: string | |
| - name: english | |
| dtype: string | |
| - name: label | |
| dtype: int64 | |
| - name: label_name | |
| dtype: string | |
| - name: original_device | |
| dtype: string | |
| splits: | |
| - name: train | |
| num_examples: 840 | |
| - name: test | |
| num_examples: 211 | |
| # TamilSangamLiteraryDeviceClassification | |
| Multi-class **literary device / rhetoric classification** for classical **Tamil Sangam** verse lines (PoetryMTEB), derived from the [Tamil Sangam Literature Dataset](https://github.com/kameshkanna/Tamil-Sangam-Literature-Dataset). | |
| Upstream `Literary Devices` strings are noisy (44 free-text labels, heavily skewed to `Imagery`). We **merge** near-duplicates and rare labels into a closed **8-class** taxonomy, then create a stratified train/test split for embedding evaluation. | |
| ## Dataset Card | |
| | Item | Description | | |
| |------|-------------| | |
| | **Source** | [Tamil Sangam Literature Dataset](https://github.com/kameshkanna/Tamil-Sangam-Literature-Dataset) (`Tamil Dangam.csv`) | | |
| | **Languages** | Tamil (`ta`); English translation & Latin transliteration kept as auxiliaries | | |
| | **Unit** | Verse **line** (`poem` = Original Tamil Text) | | |
| | **Labels** | **8** merged literary-device classes | | |
| | **Size** | train=840; test=211 (dropped empty text/label: 1) | | |
| | **Splits** | Stratified by merged label ≈ 80% / 20%, seed=42 | | |
| | **License** | Upstream repository terms (no explicit SPDX; research use — attribute source) | | |
| | **Evaluation metrics** | Classification on embeddings: **accuracy**, **macro/micro F1** | | |
| ## Label taxonomy (8) | |
| | id | label_name | zh | gloss | train | test | total | | |
| |---:|------------|----|-------|------:|-----:|------:| | |
| | 0 | `Imagery` | 意象描写 | Imagery and related visual/emotional descriptive imagery | 486 | 122 | 608 | | |
| | 1 | `Simile` | 明喻 | Simile | 102 | 26 | 128 | | |
| | 2 | `Descriptive` | 描述 | Descriptive / setting description | 91 | 23 | 114 | | |
| | 3 | `Narrative` | 叙事 | Narrative / narrative reflection | 41 | 10 | 51 | | |
| | 4 | `DirectAddress` | 直接称呼 | Direct address to a hearer / addressee | 36 | 9 | 45 | | |
| | 5 | `Metaphor` | 隐喻 | Metaphor | 26 | 6 | 32 | | |
| | 6 | `RhetoricalQuestion` | 反问/设问 | Rhetorical question / question | 11 | 3 | 14 | | |
| | 7 | `Other` | 其他修辞 | Merged rare devices (symbolism, personification, hyperbole, etc.) | 47 | 12 | 59 | | |
| Codebook: `label_taxonomy.json`. | |
| ### Merge rules (upstream → merged) | |
| | original_device | merged label | | |
| |-----------------|--------------| | |
| | `Description` | `Descriptive` | | |
| | `Descriptive` | `Descriptive` | | |
| | `Setting` | `Descriptive` | | |
| | `Direct Address` | `DirectAddress` | | |
| | `Direct address` | `DirectAddress` | | |
| | `Descriptive imagery` | `Imagery` | | |
| | `Emotional imagery` | `Imagery` | | |
| | `Imagery` | `Imagery` | | |
| | `Visual imagery` | `Imagery` | | |
| | `Metaphor` | `Metaphor` | | |
| | `Narrative` | `Narrative` | | |
| | `Narrative Reflection` | `Narrative` | | |
| | `Admonition` | `Other` | | |
| | `Conditional` | `Other` | | |
| | `Conditional Statement` | `Other` | | |
| | `Conditional statement` | `Other` | | |
| | `Contrast` | `Other` | | |
| | `Dialogue` | `Other` | | |
| | `Direct Speech` | `Other` | | |
| | `Direct speech` | `Other` | | |
| | `Direct statement` | `Other` | | |
| | `Emotional Expression` | `Other` | | |
| | `Encouragement` | `Other` | | |
| | `Exclamation` | `Other` | | |
| | `Expression of Suffering` | `Other` | | |
| | `Expression of longing` | `Other` | | |
| | `Expression of well-wishes` | `Other` | | |
| | `Historical Reference` | `Other` | | |
| | `Hyperbole` | `Other` | | |
| | `Hypothetical` | `Other` | | |
| | `Irony` | `Other` | | |
| | `Negative statement` | `Other` | | |
| | `Personification` | `Other` | | |
| | `Philosophical Reflection` | `Other` | | |
| | `Quotation` | `Other` | | |
| | `Reference` | `Other` | | |
| | `Repetition` | `Other` | | |
| | `Symbolism` | `Other` | | |
| | `Theme` | `Other` | | |
| | `Wish` | `Other` | | |
| | `Question` | `RhetoricalQuestion` | | |
| | `Rhetorical Question` | `RhetoricalQuestion` | | |
| | `Rhetorical question` | `RhetoricalQuestion` | | |
| | `Simile` | `Simile` | | |
| Any upstream string not listed above is mapped to **`Other`**. | |
| **Rationale:** `Imagery` alone covers ~57% of rows; many remaining labels have ≤4 examples and cannot support a reliable test split. Merging yields a compact, imbalanced-but-usable 8-way task. | |
| ## Features | |
| | Field | Type | Description | | |
| |-------|------|-------------| | |
| | `id` | string | Example id (`sangam-device-{line_number}`) | | |
| | `line_number` | int64 | Upstream `Line Number` | | |
| | `poem` | string | **Classification input**: Original Tamil Text | | |
| | `transliteration` | string | Latin-script transliteration (auxiliary) | | |
| | `english` | string | English translation (auxiliary) | | |
| | `label` | int64 | Merged class id (0–7) | | |
| | `label_name` | string | Canonical English class name | | |
| | `original_device` | string | Raw upstream `Literary Devices` string (before merge) | | |
| ## Construction method | |
| 1. Load `Tamil Dangam.csv` (1052 lines). | |
| 2. Map `Literary Devices` → 8-way taxonomy via the merge table above. | |
| 3. Drop rows with empty Tamil text or missing device label. | |
| 4. Stratified train/test split by `label_name` (seed=42, ≈ 80/19). | |
| ## How to load | |
| ```python | |
| from datasets import load_dataset | |
| ds = load_dataset("PoetryMTEB/TamilSangamLiteraryDeviceClassification") | |
| print(ds["train"][0]["poem"]) | |
| print(ds["train"][0]["label_name"], ds["train"][0]["original_device"]) | |
| ``` | |
| ## Intended use / limitations | |
| - PoetryMTEB multi-class probing of **Tamil poetic line** embeddings for rhetorical style. | |
| - Labels inherit upstream annotation quality; `Imagery` remains dominant after merge. | |
| - `Other` is a residual bucket — do not over-interpret fine-grained rhetoric inside it. | |
| - Companion bitext release: `PoetryMTEB/TamilSangamBitextMining`. | |
| ## Citation / provenance | |
| Please attribute the upstream dataset: | |
| - https://github.com/kameshkanna/Tamil-Sangam-Literature-Dataset | |
| - This Hub packaging: `PoetryMTEB/TamilSangamLiteraryDeviceClassification` | |
| ## License | |
| Follow the upstream GitHub repository terms. This packaging redistributes line texts and merged device labels for research evaluation under PoetryMTEB. | |