UPDF AI

Automatic Accent Restoration in Vedic Sanskrit with Neural Language Models

Yuzuki Tsukagoshi,Ikki Ohmukai

2025 · DOI: 10.18653/v1/2025.bhasha-1.7
Bhasha · 0 Citations

TLDR

Re-sults demonstrate that LLMs can capture complex accentual patterns and recover lost information, opening possibilities for potential improvements in sandhi splitting, morphological analysis, syntactic parsing and machine translation in Vedic NLP pipelines.

Abstract

Vedic Sanskrit, the oldest attested form of San-skrit, employs a distinctive pitch-accent sys-tem that marks one syllable per word. To the best of our knowledge, this work presents the first application of large language models to the automatic restoration of accent marks in transliterated Vedic Sanskrit texts. A comprehensive corpus was assembled by extracting major Vedic works from the TITUS project and constructing paired samples of unaccented input and correctly accented references, yielding more than 100,000 training examples. Three generative LLMs were fine-tuned on this corpus: a LoRA-adapted Llama 3.1 8B Instruct model, OpenAI GPT-4.1 nano, and Google Gemini 2.5 Flash. These models were trained in a sequence-to-sequence fashion to insert accent marks at appropriate positions. Evaluation on roughly 2,000 sentences using precision, recall, F1, character error rate, word error rate, and ChrF1 metrics shows that fine-tuned models substantially outperform their untuned baselines. The LoRA-tuned Llama achieves the highest F1, followed by Gemini 2.5 Flash and GPT-4.1 nano. Error analysis reveals that the models learn to infer accents from grammatical and phonological context. These re-sults demonstrate that LLMs can capture complex accentual patterns and recover lost information, opening possibilities for potential improvements in sandhi splitting, morphological analysis, syntactic parsing and machine translation in Vedic NLP pipelines.