This is one of the examples where English is perfectly consistent.
edit: OK, the ("a") "nvidia employee" seems to provide a counterexample, but is it really about names? I think it's about repetition, "an Nvidia employee" just sounds strange due to the "en-en".
But yeah, maybe it is a rare exception, because "an n-gram" is probably standard.
I'm perfectly fine with applying the rule to all other proper names? E.g. "a Microsoft employee" or "an HSBC product".
The writeup lost me there, when it jumps to hard-codes lists using this example as justification. AI slop?
> The actual rule is not whether the written word starts with a vowel letter, but whether the spoken word starts with a vowel sound.
The only exemption I know about is emphasis by pause, it allows to use "a" before a vowel sound in some exceptional cases.
So the rest of the goal description is solely about how words are pronounced? I mean that the question whether to use "a" or "an", and wanting to define a function that decides this, is equivalent to aiming at a function that decides whether the pronunciation of a word starts with an audible consonant or vowel.
This is described on the site, I see now. But it jumps to data science and statistics before even stating the problem accurately?
I still don't know what kind if "exceptions" it talks about, because it already treats things like "an HN submission" as an "exception", when it clearly isn't one.
Some people pronounce nvidia as nuhvidia others as envidia so when the writer puts "a" or "an" before it they're revealing how they pronounce it
I avoid making exceptions to the rule, but in the vernacular, people definitely break from it! You'll see e.g. "an historic event", usually justified because the first syllable is weak and close enough to being vowel-started.
FWIW "an Nvida employee" sounds better than me an "a Nvidia employee" because the latter has two vowels with no consonant separating them ... and I don't get repetition there because the vowels are different.
An historic just sounds pretentious, sorry :p
You don’t have to apologize, I don’t like it either.