nghimestudio/vietnormalizer — reverse-engineered prompt

Reverse engineered prompt

Build me a simple Python library that normalizes Vietnamese text for TTS and NLP. I want one main class where I can pass in a sentence and get back clean, spoken style Vietnamese text. It should handle numbers, dates, times, date ranges, year ranges, percentages, currencies like VND and USD, phone numbers, measurement units, ordinals, and common symbols like &, @, and #. It should also clean URLs, emails, emojis, odd punctuation, and normalize Unicode.

Please make it smart about acronyms and foreign words using built in CSV dictionaries, with a rule based fallback that transliterates unknown non Vietnamese words but leaves actual Vietnamese words alone. I’d also like a few helper functions for number conversion, transliteration, and checking whether a word is Vietnamese.

Keep it lightweight, fast, and compatible with Python 3.8 and up, ideally without extra dependencies. Please include tests and a short README with examples, including how to load custom dictionaries and how to turn preprocessing or transliteration on and off. Look up current docs online if you need to.

Want more depth? Deep Reverse