Skip to main content
GameDev.net gamedev.net
Developer Blog

This is a developer's personal perspective or experience. Views expressed are those of the author.

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Red Blob Games
Red Blob Games Blog
· 20 hours, 52 minutes ago

English: a vs an

Briefing

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.”

— Red Blob Games · Explaining why naive a/an logic fails
Original source
Read on Red Blob Games
At a glance
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
Signal Neutral

Technical exploration with practical utility

Discuss

Follow procedural-text updates

See relevant stories in your personalized news feed.

Sign in to follow

Continue on GameDev.net

Useful next steps related to this story.

Game development news without the noise

One useful weekly briefing. No daily flood.

Sending your confirmation email…

Discussion

Loading comments...