| --- |
| language: |
| - dv |
| task_categories: |
| - text-generation |
| - text-classification |
| pretty_name: Dhivehi Instruct v1 |
| size_categories: |
| - 10K<n<100K |
| tags: |
| - dhivehi |
| - thaana |
| - instruction-tuning |
| - maldives |
| configs: |
| - config_name: default |
| data_files: |
| - split: train |
| path: data/train-* |
| - split: validation |
| path: data/validation-* |
| --- |
| |
| # Dhivehi Instruct v1 |
|
|
| A high-quality, multi-task instruction dataset designed to improve Natural |
| Language Processing (NLP) capabilities for the Dhivehi language. Formatted in a |
| standard conversational structure, it provides clean, contextually accurate |
| data for training, fine-tuning, and evaluating language models on |
| Dhivehi-specific tasks. |
|
|
| **v1 contains no synthetic text.** Every assistant output is human-written |
| corpus text or a deterministic, rule-based transform of it. No LLM wrote a |
| single Dhivehi character in this dataset — a deliberate design choice for a |
| first release, so the data carries no model-generated hallucination or style |
| contamination. |
|
|
| - **Language(s):** Dhivehi (Thaana script), English, Romanized Dhivehi (Latin script) — used in the *instructions*; assistant outputs are Dhivehi or its Latin transliteration. |
| - **Format:** Instruction-following (USER / ASSISTANT) |
| - **Size:** 20,907 rows — 20,489 train / 418 validation |
|
|
| ## Dataset Structure |
|
|
| ### Tasks Included |
|
|
| | Task | Rows | Description | |
| |---|---|---| |
| | `headline` | 8,000 | Summarizing news articles into concise, culturally and contextually accurate journalistic headlines. Output is the article's original human-written title. | |
| | `transliteration` | 6,000 | Converting native Thaana script into Romanized Dhivehi (Latin script), mapping phonetic nuances, suffixes, and double vowels via a rule-based romanizer. | |
| | `classification` | 3,915 | Categorizing Dhivehi text into standard topics. Prompts include open-ended labeling and multiple-choice constraints, delivered in Dhivehi, English, and romanized Dhivehi. | |
| | `continuation` | 3,000 | Autoregressive completion that naturally continues a given Dhivehi narrative or news report, using the document's actual next sentences. | |
|
|
| Classification is fully balanced: **9 classes × 435 rows** — ޚަބަރު (news), |
| ކުޅިވަރު (sports), ވިޔަފާރި (business), މުނިފޫހިފިލުވުން (entertainment), |
| ދިރިއުޅުން (lifestyle), މަޢުލޫމާތު (reference), ސަރުކާރު (government), |
| ދީން (religion), އަދަބިއްޔާތު (literature). About 40% of classification rows |
| are phrased as multiple-choice. |
|
|
| Instruction wording is sampled from hand-authored templates across three |
| languages: Dhivehi (~70%), English (~20%), and romanized Dhivehi (~10%). |
|
|
| ### Data Instances |
|
|
| An example of a transliteration task from the dataset: |
|
|
| ``` |
| USER: ތިރީގައިވާ ދިވެހި ޖުމްލަ ތާނައިން ލެޓިނަށް ބަދަލުކޮށްދީ. |
| ރަށްފަޅުހުރާ ފަޅުގައި ހިންގާ ޕަޓީނާ މޯލްޑިވްސް ރިސޯޓުގައި ނުރައްކާތެރި އެކްސިޑެންޓެއް ހިނގައި އެތަނުގެ މުވައްޒަފަކު އިއްޔެ މަރުވެއްޖެ އެވެ. |
| ASSISTANT: raffalhuhuraa falhugai hingaa pateenaa moaldivs risoatugai nurakkaatheri eksidente' hingai ethanuge muvazzafaku iyye maruvejje eve. |
| ``` |
|
|
| ### Row Schema |
|
|
| ```json |
| { |
| "messages": [ |
| {"role": "user", "content": "<instruction + input text>"}, |
| {"role": "assistant", "content": "<human-written or rule-derived output>"} |
| ], |
| "task": "headline | classification | continuation | transliteration", |
| "instr_lang": "dv | en | latin", |
| "template_id": "<instruction template used>", |
| "source_doc_id": "<id of the source document>", |
| "generator": "template", |
| "meta": {} |
| } |
| ``` |
|
|
| ## Sources |
|
|
| - [d3b4g/dhivehi-corpus](https://huggingface.co/datasets/d3b4g/dhivehi-corpus) — Dhivehi news corpus (~430k docs) |
| - [d3b4g/dhivehi-stories](https://huggingface.co/datasets/d3b4g/dhivehi-stories) — Dhivehi creative writing (~18k docs) |
|
|
| ## Construction & Data Hygiene |
|
|
| The build is fully seeded and reproducible. Key steps: |
|
|
| 1. **Filter** — documents need ≥85% Thaana among their letters and 80–3,000 |
| words. Excerpt-length documents (15–79 words) are admitted for the |
| classification task only. |
| 2. **Frozen holdout** — 5% of all filtered document IDs (22,248) are frozen |
| *before* any rows are built. No training or validation row derives from a |
| holdout document, and the publishing script hard-fails if any does. The |
| holdout seeds a future **DhivehiEval** benchmark, giving this dataset a |
| hard-enforced train/eval separation. |
| 3. **One task per document** — each source document contributes to at most one |
| task, preventing near-duplicate leakage (e.g. a headline row and a |
| continuation row derived from the same article). |
| 4. **Validation & dedup** — schema, length, and Thaana-ratio checks, followed |
| by exact and MinHash near-duplicate filtering on outputs. |
|
|
| Task-specific cleaning applied during validation: |
|
|
| - **Cut-off removal:** Some source texts are scraped teasers that end |
| mid-thought with an ellipsis (…). Rather than repair them, rows whose input |
| ends this way are **dropped entirely** — the published data contains no |
| ellipsis-truncated prompts. |
| - **Script normalization:** Arabic ligatures embedded in Dhivehi text (e.g. |
| ﷲ) are romanized in transliteration targets to their standard Latin forms |
| (`allah`, or `abdhullah` when attached to a name stem), and Arabic |
| punctuation is mapped to ASCII. Any sentence with a character the romanizer |
| cannot fully convert is dropped, so no stray non-Latin glyphs survive in |
| transliteration outputs. |
| - **Clean outputs:** ASSISTANT responses contain strictly the requested output, |
| with no conversational filler — optimal for programmatic evaluation and |
| automated pipelines. |
|
|
| ## Use Cases |
|
|
| A foundational resource for downstream Dhivehi NLP, including: |
|
|
| - **Instruction tuning** — teaching base models to follow Dhivehi instructions across classification, generation, and transliteration. |
| - **Content categorization** — tagging local-language news, feedback, and unstructured business text using the balanced classification data. |
| - **Accessibility & tooling** — leveraging the Thaana↔Latin transliteration pairs for text-to-speech front-ends, search, and reading assistants. |
|
|
| ## Known Limitations |
|
|
| - **Continuation flow:** Because outputs are the source document's real |
| subsequent sentences, models trained on this subset may occasionally see |
| abrupt topic transitions where the original article changed context. |
| Evaluate generative output flow accordingly. |
| - **Transliteration convention:** Outputs follow one common informal Malé Latin |
| convention; Dhivehi romanization has no single standard, and other schemes |
| exist. |
| - **Classification labels** derive from publisher section metadata, which is |
| noisy at the margins. |
| - **Register skew:** the corpus is heavily news-weighted; the stories source |
| provides the only substantial non-journalistic register. |
| - No open-ended QA, summarization, or reasoning tasks yet — planned for v1.1 |
| after a human-reviewed pilot. |
|
|
| ## License and Intended Use |
|
|
| Source texts are the copyright of their original publishers; this dataset is |
| released for research use in Dhivehi NLP. If you are a publisher of source |
| material and have concerns, please open a discussion on this repository. |
|
|