alakxender/dhivehi-transliteration-pairs
Viewer • Updated • 188k • 29
This model is a specialized Latin-to-Thaana transliteration model optimized for Maldives news media, but also capable of handling both formal journalistic text and casual social media typing.
It functions as a "Hybrid" model: it respects the casual spacing of chat messages while correctly applying formal grammatical rules (such as compounding verbs) when it detects a news context.
| Category | Latin Input | Model Output |
|---|---|---|
| Formal Grammar | Raeesul jumhooriyya... thasdheegu kuravvaifi |
ރައީސުލް ޖުމްހޫރިއްޔާ... ތަސްދީގުކުރައްވައިފި |
| Casual / Chat | Aharen miadhu varah ban'du hai |
އަހަރެން މިއަދު ވަރަށް ބަނޑުހައި |
| Official Titles | Minister of Foreign Affairs Moosa Zameer |
މިނިސްޓަރު އޮފް ފޮރިން އެފެއާސް މޫސަ ޒަމީރު |
| News Phrasing | Police service in vanee ekan kuhveri kohfa |
ޕޮލިސް ސާވިސްއިން ވަނީ އެކަން ކުށްވެރިކޮށްފައި |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("Neobe/dhivehi-byt5-latin2thaana-v1")
model = AutoModelForSeq2SeqLM.from_pretrained("Neobe/dhivehi-byt5-latin2thaana-v1")
text = "Raeesul jumhooriyya miadhu ganoonu thasdheegu kuravvaifi"
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_length=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# Output: ރައީސުލް ޖުމްހޫރިއްޔާ މިއަދު ގާނޫނު ތަސްދީގުކުރައްވައިފި