Menu

Why our Indian English checker is 50 regexes and no LLM
📰

Why our Indian English checker is 50 regexes and no LLM

DEV Community: javascript·WizMantra Academy·9 days ago
#wwsIPsHg
#devtojavascript#devto#dev#revert#rule
Reading 0:00
15s threshold

Paste "Kindly do the needful and revert at the earliest" into any LLM and ask it to fix the tone. You'll get a nice answer. You'll also get a rewritten email that sounds like the LLM, and no idea which three phrases were the problem.

We built the opposite for our learners: an Indian English checker that's 50 regular expressions in one file. Each one flags a phrase, suggests a swap, and says why.

What a rule looks like

// [pattern, replacement, kind, why] kind: i = Indianism, s = stiff, c = too casual [ / \b kindly do the needful \b /gi , " please take care of this " , " i " , " \" Do the needful \" is understood in India and puzzling almost everywhere else. Say what you actually need. " ], [ / \b prepone ( d )?\b /gi , function ( m , d ) { return d ? " brought forward " : " bring forward " ; }, " i " , " \" Prepone \" is Indian English only. Use \" bring forward \" or \" move up \" . " ], [ / \b I have ( a|some|few|a few ) doubts ?\b /gi , ..., " i " , " In Indian English \" doubt \" means question.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.