English: a vs an
Red Blob Games explored a deceptively simple localization problem: deciding when generated text should use a or an. The key point is that English depends on the spoken sound, not the first written letter, so naive vowel checks break on words like unicorn and hour.
For game developers, this matters anywhere text is assembled on the fly: item descriptions, dialogue templates, tooltips, debug output, and UI copy. The practical challenge is less about the rule itself than about handling the edge cases without building a brittle special-case mess.
The investigation looked at a word list of 32,455 entries and found only 129 exceptions that needed nontrivial handling. That suggests the problem is tractable with a compact pronunciation-based lookup or rule set, rather than a huge handcrafted table.
The broader lesson is useful for anyone shipping procedural text: correctness often lives in the awkward corners, but the corner cases may be smaller than they first appear. The work also hints that a lightweight data-driven solution can be good enough for one-off tooling, especially when the goal is correctness over elegance.
“The actual rule is not whether the written word starts with a vowel letter, but whether the spoken word starts with a vowel sound.”
- what
- A pronunciation-based a/an selector was explored for procedurally generated text
- who
- Red Blob Games
- when
- The author spent a day analyzing the data
- impact
- Useful for generated dialogue, tooltips, item names, and other dynamic text
Technical exploration with practical utility
Follow procedural-text updates
See relevant stories in your personalized news feed.
Discussion