Datasets:
Tasks:
Text Classification
Formats:
parquet
Sub-tasks:
multi-class-classification
Languages:
Tamil
Size:
1K - 10K
License:
File size: 6,945 Bytes
ee6df5b | 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 | ---
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.
|