We Naively Thought Pinyin, Romaji, Hinglish, and Arabizi Were the Same Problem

Aijie ShuFounder & Developer · FigurichUpdated3 min read

When we first sat down to train UnimeType's multilingual Convert model, we had a dangerously optimistic assumption. Chinese Pinyin, Japanese Romaji, Hindi Hinglish, and Arabic Arabizi all start the exact same way on screen: someone sits at a standard English QWERTY keyboard and types Latin characters to represent a non-Latin script. If the input is always ASCII phonetics, we figured, training one model across all four should mostly be a matter of feeding it four vocabularies.

That illusion lasted right until our first evaluation run finished. Reading through the error logs made it painfully obvious that these four scripts only look alike on the keyboard. In actual training, they fail in four completely unrelated ways.

In Chinese Pinyin, the central headache is extreme homophone density packed into tiny syllables. Nobody types tone numbers in daily chat, so a three-letter syllable like shi can map to dozens of common characters depending on whether the sentence is talking about time, a person, a city, or a verb. When someone types an unspaced run like mingtianshangwu and drops an English verb into the middle (mingtian sync yixia), the model has to segment the Pinyin lattice from full-sentence context while resisting the urge to turn sync into Chinese characters.

Switch to Japanese Romaji, and the problem flips from "which homophone?" to "which writing system?" A single natural Japanese sentence weaves three scripts together: Kanji for word stems, Hiragana for grammatical particles and inflectional endings (okurigana), and Katakana for loanwords, alongside raw Latin characters for English technical nouns like API latency. What trips models up most in Japanese isn't rare vocabulary; it's tiny Romanized particles like node (ので, "because") and to (と, "and"), which look identical to the English runtime Node and preposition to unless the model reads the grammar of the surrounding clause.

Hinglish brings a different challenge altogether. Unlike Pinyin or Hepburn Romaji, everyday Romanized Hindi has no single rigid spelling standard. One person types kya kar rahe ho while another types kya kr rhe ho, and almost every workplace sentence blends Hindi grammar with English nouns (kal subah release notes bhej dena). In Hinglish, deciding which words not to touch, and stopping the model from translating the Hindi into English instead of transliterating it into Devanagari, is half the battle.

Then there is Arabizi, which bends the ASCII character set itself. Because standard Latin letters don't cover several Arabic pharyngeal and glottal consonants, Arabizi writers use digits inside words: 3 for ع, 7 for ح, 2 for ء, and so on. That means a single line like sa3a 3 or b3d el commit v2 contains digits doing two opposite jobs: the 3 inside sa3a (ساعة) and b3d (بعد) must become the Arabic letter ع, while the standalone 3 and v2 must remain literal numbers. Add regional dialect spelling across Egyptian, Levantine, and Gulf Arabic, where short vowels are dropped and multiple Arabic spellings can be equally valid, and naive rule tables fall apart immediately.

Realizing that these four scripts fail for four completely different reasons changed how we evaluate every checkpoint we train. A single combined accuracy number across all languages is worse than useless, because a jump in Chinese accuracy can easily hide a regression where Arabic starts eating version numbers or Japanese leaves particles in Latin script.

Comparison of disambiguation challenges across Pinyin, Romaji, Hinglish, and Arabizi

Today we grade Chinese, Japanese, Hindi, and Arabic on separate benchmark slices, alongside dedicated checks for protected English identifiers, code literals, multiline formatting, and alternate candidates. If you want to see the full benchmark numbers, dataset breakdown, and local setup instructions, read our engineering guide to training and evaluating Transliteration 2.0, or check Input languages for how each language behaves in the app.