text library
Text normalization, Roman Urdu spelling and Urdu digits.
Same as the pakdatakit/text entry point of the npm package.
Functions
-
normalizeRomanUrdu(
String text) → String -
Normalizes informal Roman Urdu spellings to common forms (
kia→kya,nhi→nahi). -
normalizeText(
String text) → String - Normalizes general text: trims, collapses whitespace and applies Unicode NFC.
-
toEnglishDigits(
String text) → String - Converts Urdu and Arabic-Indic digits to English digits (0–9).
-
toUrduDigits(
String text) → String - Converts English and Arabic-Indic digits to Urdu digits (۰–۹).