--- language: - dv tags: - transliteration - dhivehi - thaana - byt5 - news - nlp license: apache-2.0 base_model: google/byt5-small datasets: - alakxender/dhivehi-transliteration-pairs widget: - text: "ރައީސް މުއިއްޒު ވަޑައިގެންފި" example_title: "Presidential Visit" - text: "ސީރިއާގެ ކަންކަމުގެ ތެރެއަށް އިސްރާއީލް ނުވަނުމަށް" example_title: "Global Politics (Syria)" - text: "އެންމެ މުހިންމީ ކުޅިވަރު ދާއިރާ ހިންގާނެ މީހުން އުފެއްދުން" example_title: "Sports (General)" inference: parameters: max_length: 256 --- # Dhivehi ByT5 News Transliteration (v1) This model is a specialized **Thaana-to-Latin transliteration model** optimized for Maldivian news media. It is designed to handle the complexities of journalistic text, focusing on the correct preservation of **context, English loan words, and named entities** (e.g., Country names, Acronyms like UN, Sports teams). ## 🧠 Training Strategy 1. **Base Model:** [google/byt5-small](https://huggingface.co/google/byt5-small) 2. **General Fine-tuning:** Tuned on the [alakxender/dhivehi-transliteration-pairs](https://huggingface.co/datasets/alakxender/dhivehi-transliteration-pairs) dataset (~180k pairs) to learn general transliteration rules. 3. **Domain Adaptation:** Further fine-tuned on a high-quality dataset of 10k News headlines to capture journalistic style and entities. ## 📊 Performance Samples | Category | Thaana Input | Model Output | | :--- | :--- | :--- | | **Global Politics** | ސީރިއާގެ ކަންކަމުގެ ތެރެއަށް އިސްރާއީލް ނުވަނުމަށް | `Syria ge kankamuge thereah Israel nuvanumah` | | **Acronyms** | ރާއްޖޭގެ ރެކޯޑުތައް އދ އިން ބަލަނީ | `Raajjeyge record thah UN in balanee` | | **English Loan Words** | ސްކޭމާއި ދެކޮޅަށް ހިންގި ޚާއްސަ އޮޕަރޭޝަނެއް | `Scam aai dhekolhah hingi khaassa operation eh` | | **Sports** | ވެސްޓް ހޭމް އަތުން ޗެލްސީ އަށް މޮޅެއް | `West Ham athun Chelsea ah molheh` | | **Dates** | އޮކްޓޯބަރ 3 ގެ މުޒާހަރާ | `October 3 ge muzaaharaa` | ## 💻 Usage ```python from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Neobe/dhivehi-byt5-thaana2latin-v1") model = AutoModelForSeq2SeqLM.from_pretrained("Neobe/dhivehi-byt5-thaana2latin-v1") text = "ސީރިއާގެ ކަންކަމުގެ ތެރެއަށް އިސްރާއީލް ނުވަނުމަށް ޓްރަމްޕް ގޮވާލައްވައިފި" inputs = tokenizer(text, return_tensors="pt") outputs = model.generate(**inputs, max_length=256) print(tokenizer.decode(outputs[0], skip_special_tokens=True)) # Output: Syria ge kankamuge thereah Israel nuvanumah Trump govaalavvaifi