[KongchangAI]
· 2 min read· 1,034 words

LipiMix: Solving the Nepali-English Code-Mixed Transliteration Challenge

LipiMix: Solving the Nepali-English Code-Mixed Transliteration Challenge

LipiMix open-sources a large-scale corpus and model to transliterate Romanized Nepali-English code-mixed text into Devanagari.

LipiMix is a low-resource transliteration system for Romanized Nepali-English code-mixed text, converting non-standardized Romanized writing into standard Devanagari. The team collected over 2.77 million comments, retained 444,000+ Romanized sentences, and built a Phonetic Variant Dictionary mapping 92,700+ spelling variants to 15,600+ canonical forms. Fine-tuned ByT5 achieved a CER of 5.96% and a WER of 21.85%.

In everyday digital communication in Nepal, Romanized Nepali mixed with English (code-mixing) is extremely common, but this non-standardized writing style poses significant challenges for NLP systems. The recently released LipiMix system focuses on transliterating such code-mixed text into Devanagari, and has open-sourced a large-scale dataset and model.

The Transliteration Challenge of Code-Mixed Text

Informal Nepali digital communication often interweaves Romanized Nepali with English in the same sentence, such as expressions like "ma aaja office jaana." This writing style is highly inconsistent and lacks standardization, making it difficult for NLP models trained on formal Devanagari corpora to process. LipiMix was proposed precisely to fill this gap, building a low-resource system specifically designed to transliterate such code-mixed text into standard Devanagari script.

LipiMix Project Overview

Devanagari is an abugida writing system used for Nepali, Hindi, Sanskrit, and many other South Asian languages. Each consonant letter carries an inherent vowel "a" by default, which must be changed or removed through diacritics (vowel signs). Unlike the Latin alphabet, Devanagari has strict and standardized writing rules, with relatively regular correspondences between characters and phonemes. Therefore, transliterating Romanized Nepali into Devanagari is not a simple character mapping—it requires handling the many non-standard variants in Romanized spelling (e.g., "aaja," "aja," and "aajaa" all mean "today") and correctly restoring diacritics. This characteristic makes the transliteration task essentially a phonologically-constrained sequence-to-sequence generation problem.

Large-Scale Corpus and Phonetic Variant Dictionary

To train an effective transliteration model, the research team first collected over 2.77 million comments from YouTube and Facebook, retaining more than 444,000 usable Romanized sentences after cleaning. More importantly, they constructed a Phonetic Variant Dictionary (PVD) that maps over 92,700 spelling variants to more than 15,600 canonical forms. This dictionary not only captures common spelling differences but also provides a foundation for subsequent data augmentation.

The Phonetic Variant Dictionary (PVD) is one of LipiMix's core innovations. Since Romanized Nepali lacks orthographic standards, the same canonical word often corresponds to multiple spelling variants—for example, "घर" (house) may be written as "ghar," "gharr," or "gar." The PVD essentially constructs a mapping table from noisy spellings to standard Devanagari words by clustering and mapping over 92,700 variants to more than 15,600 canonical forms. This dictionary is used not only to assist disambiguation during inference, but more importantly as a "variant generator" for data augmentation: for each canonical word in the parallel corpus, its known variants are substituted in, thereby significantly expanding the diversity of training data without substantially increasing manual annotation costs, and improving the model's generalization to unseen spelling variants.

Manual Annotation and Data Augmentation

The team manually annotated 20,500 sentence pairs to build a parallel corpus. Using the PVD, they expanded the corpus to over 85,800 pairs through a dictionary-based augmentation method. This augmentation strategy effectively improved the model's robustness to spelling variants, enabling a considerable training data scale even with limited manual annotation.

Model Fine-Tuning and Performance Evaluation

The researchers fine-tuned two seq2seq models, ByT5 and mT5, on the augmented corpus. Among them, the ByT5 model fine-tuned on augmented data performed best, with a character error rate (CER) of 5.96% and a word error rate (WER) of 21.85%, outperforming several publicly available Nepali transliteration systems. This result demonstrates the effectiveness of the PVD and augmentation strategy built on large-scale noisy data.

ByT5 and mT5 both belong to the T5 (Text-to-Text Transfer Transformer) family proposed by Google. T5 unifies all NLP tasks into a "text-to-text" sequence generation framework. mT5 is its multilingual version, pre-trained on a corpus covering 101 languages and using SentencePiece subword tokenization. ByT5 completely abandons the tokenizer, directly using UTF-8 bytes as input and output units, making it more robust to spelling variants, noise, and out-of-vocabulary words—especially suitable for processing non-standardized text. In this task, ByT5's byte-level modeling capability enables it to capture the correspondences between Romanized spellings and Devanagari characters at a finer granularity, which explains its superior performance over mT5 on augmented data.

Character Error Rate (CER) and Word Error Rate (WER) are two core metrics for evaluating transliteration/speech recognition systems. CER calculates the ratio of the minimum edit distance (insertions, deletions, substitutions) between the predicted character sequence and the reference character sequence to the total number of reference characters; WER performs the same edit distance calculation at the word level. CER is more sensitive to character-level errors and is suitable for evaluating the quality of diacritic and spelling detail restoration in transliteration tasks; WER reflects overall word-level usability. LipiMix's reported CER of 5.96% means approximately 6 errors per 100 characters on average, while the WER of 21.85% indicates that word-level errors remain relatively high, partly due to homophone and diacritic ambiguity.

Limitations and Open-Source Contributions

Despite its superior performance, LipiMix still faces key limitations such as homophone ambiguity and diacritic errors. Different spellings of homophones may lead to transliteration errors, and subtle diacritic differences are also difficult to fully capture. However, the research team has made all datasets, model checkpoints, and code publicly available on GitHub (https://github.com/oceangiri23/Transliteration), providing valuable resources for future research.

LipiMix's work highlights the challenges and opportunities of low-resource languages in informal text processing. By combining large-scale web corpora, a phonetic variant dictionary, and data augmentation, it provides a viable path toward more robust code-mixed text transliteration. With the release of open-source resources, more research on Nepali and other similar languages is expected in the future.

One-line Summary

LipiMix open-sources a large-scale corpus and model to transliterate Romanized Nepali-English code-mixed text into Devanagari.

Paragraph Summary

LipiMix is a low-resource transliteration system for Romanized Nepali-English code-mixed text, designed to convert non-standardized Romanized writing into standard Devanagari. The research team collected over 2.77 million comments from YouTube and Facebook, retaining more than 444,000 Romanized sentences after cleaning, and constructed a Phonetic Variant Dictionary (PVD) mapping over 92,700 spelling variants to more than 15,600 canonical forms. Based on 20,500 manually annotated sentence pairs, data augmentation using the PVD expanded the parallel corpus to over 85,800 pairs. The ByT5 model fine-tuned on augmented data achieved the best performance, with a CER of 5.96% and a WER of 21.85%, outperforming several public systems. Homophone ambiguity and diacritic errors remain the main limitations. All datasets, model checkpoints, and code have been open-sourced on GitHub.

#LipiMix#Nepali transliteration#code-mixing#Devanagari#ByT5#phonetic variant dictionary#low-resource NLP
Share:

Related articles