Hacker news

  • Top
  • New
  • Past
  • Ask
  • Show
  • Jobs

English: A vs. An (https://www.redblobgames.com)

358 points by azhenley 2 days ago | 515 comments | View on ycombinator

hbn 2 days ago |

A funny quirk of English I never noticed until I started learning Spanish:

In Spanish, to say for example, "he is a doctor," you would say "él es médico." Which more literally translates to "he is doctor," which feels unintuitive coming from English. Spanish DOES have an equivalent for "a" - "un/una", so the natural thing for an English speaker to say would be "él es UN médico", but I understand that to be awkward/unnatural.

But then I realized, when you say the same sentence in plural - "they are doctors" - you don't have an article. You don't say "they are some doctors" (I had to Google, apparently "some" isn't an article anyway?)

So Spanish ends up more consistent - Singular: "Él es médico." Plural: "Ellos son medicos."

Unlike English - Singular: "He is a doctor." Plural: "They are doctors."

abraxas 2 days ago |

What gets me as a non-native speaker far more than "a vs an" is the "a vs the" conundrum. I still don't quite get when something needs to be "indefinite" and I've been speaking English for close to forty years. My native tongue lacks articles altogether and it's soo bloody hard I feel hopeless I'll ever master them fully.

shagie 2 days ago |

It's avoiding two distinct vowel sounds in succession.

Consider other variations of this rule.

In French, one would say "l'hôpital" rather than "le hôpital" because the 'h' is an aspirated breath (try saying "a aspirated" rather than "an aspirated") leading to an initial vowel sound.

In Irish, the word for father is "athair". To say "her father" it becomes "a hathair" https://en.wikipedia.org/wiki/Prothesis_(linguistics)

In Turkish, it can be seen with araba (car). "I saw the car" -> "Arabayı gördüm." (note the 'y' to avoid two vowels). Book is kitap and "I saw the book" is "Kitabı gördüm." Which doesn't need the additional consonant sound between the final sound and the "ı".

Whatever language you speak, it likely has some form of this rule.

And other languages have the quirk too (like the "a unicorn" or "a university"). For example, in French there's l’hôtel and l'hôpital. But if you've got the hedge... it's la haie... or even more egregiously, the marmoset is le ouistiti.

deliciousturkey 1 day ago |

As a native speaker of a language without articles, I find the English article system by far the most intuitive and easiest to learn of all the languages I have studied. Most other Indo-European languages have articles that you simply need to memorize, as there is no way to derive them from the word itself. Which I never manage to do.

theanonymousone 1 day ago |

The most problematic for me as a non-native has been "the" vs "nothing", i.e. when one can/should put the definite article.

Pre-LLM I was joking that real AI is whatever can make that decision correctly 100% of times.

mauvehaus 2 days ago |

Fun fact an adder (snake) was once a nadder, and an apron was on a napron. This fun fact brought to you by The History of English Podcast.

https://historyofenglishpodcast.com/

Happily sourced in Wikipedia so I don't have to figure out which episode I learned that from:

https://en.wikipedia.org/wiki/Adder <- see below the table in Taxonomy.

bugufu8f83 1 day ago |

> if word.startswith("ub"): return False

An uber-rich man riding in an Uber installed an Ubuntu package.

I'm actually a bit surprised by this rule. Is this line there entirely due to the word "ubiquitous"? I think it is.

Dwedit 1 day ago |

There's also "the" vs "the". As in "the boy ate the apple". First 'the' ends with a schwa sound. Second 'the' ends with 'ee' sound.

throwawayk7h 2 days ago |

I'm always curious why sometimes I pronounce the as /ðə/ ("thuh") and sometimes as /ði/ ("thee"). I don't really know what governs this but I expect it's the presence of a vowel at the start of the following word. However, only some vowels. Does anyone have an answer?

faaager about 10 hours ago |

A quirky story about A vs. An.

When I was in third grade we started studying english (I'm Swedish). One day our teacher was aiming to teach us when to use a vs. an.

I came home and showed my mother what I had done during the day, and I had copied the drawing the teacher had done on the blackboard that basically stated that "A" was used for singular and "An" for Plural. Example given was: A foot, An foots.

End of story

Rendello 2 days ago |

Starting earlier today, I've been using Firefox's local translation feature to auto-translate every page to Italian (to learn). I just had to remove English from my language list and check an option to translate English to Italian.

Firefox's local translation is pretty decent but not amazing. It did render this article's title as "Italiano: A vs. An", which I found pretty funny.

quuxplusone about 20 hours ago |

Perhaps relevant to this audience: NetHack has a routine specifically for this.

https://github.com/NetHack/NetHack/blob/NetHack-5.0/src/objn...

I think I agree with the comment in NH5 that some of the new cases "probably shouldn't be handled here", and think maybe NH3.4.3's simpler version should've been fine for NetHack's purposes:

https://github.com/Vanilla-NetHack/NetHack-3.4.3/blob/master...

dtm9876541234 about 8 hours ago |

Of course regional variations are a thing here too - for example in Welsh accents, it often is "An unicorn" (pronounced like "an iwnicorn")

sajithdilshan 1 day ago |

I would take a/an any day over ein/einen/einem/einer/eines in German

vbernat 1 day ago |

"anorack" is a specific spell checker to tell if we need "a" or "an". It uses espeak to decompose a word into phonemes.

mh-cx 1 day ago |

Non-native speaker here. To me in spoken language both "unicorn" and "hour" have a combination of 2 vowels in the beginning. Let me transcribe them as "ee-oo" and "aa-oo" here.

Why is the aa-oo combination at the beginning of "hour" considered a vowel but the ee-oo in "uniform" is a consonant?

dearjames 2 days ago |

This reminds me of the multiple AI videos out there that I have to involuntarily listen to because people hate using earphones/headphones. They just start off like "The man/woman blah blah blah", and my poor brain is always noting that's bad English/grammar or whatever because What man/woman are you talking about? Where did he/she come from in this story that you just started telling?

bradrn 2 days ago |

i think this post with more details would be a better link: https://www.redblobgames.com/x/2635-a-vs-an/. The graph of exceptional cases is particularly interesting.

(Besides, it clarifies the colour scheme — the red vs black went totally unnoticed to my colourblind eye.)

xelxebar 2 days ago |

The one that gets me is when people use "a" with initialisms, e.g. "She drives a RV," just sounds off to me. she can do her thing but I drive an RV.

That said, I think the former might be more common these days, so arguably the rules might just differ between written an spoken English in some dialects.

eviks 1 day ago |

Interesting analysis

> [LLM It doesn’t need to be clean or maintainable. It only needs to be correct

But correctness is precisely the issue with LLMs?

But also

> I would’ve spent more time on the trie simplification algorithm and less time on parsing cmudict and re-learning d3.js.]

You could've spent nothing on D3 because the result is bad/poorly readable - much worse than a simple table alphabetically-aligned interception table, which I could use to answer curious questions such as "how can I compare "A" and "O" in terms of exceptions? or "which letter has the most exceptions"?")

(and the blue color is out of place, vowel/consonant split should visually be the same "category", not black/colord. Red for exceptions is fine)

MathMonkeyMan 1 day ago |

Is it "a LLM" or "an LLM"?

More generally, do you choose the article as if the first letter of the initialism were pronounced or as if the first word of the initialism were pronounced? Does it differ with acronyms? Does it differ between the UK and America?

YoshiRulz 2 days ago |

For anyone interested in getting "more 9s" from the heuristics and then building something useful with it, come join us at https://www.wikifunctions.org/wiki/Z32314

smusamashah 1 day ago |

The A becomes An for the same reason as the linking R https://en.wikipedia.org/wiki/Linking_and_intrusive_R

As a non-native now living in UK I noticed this R sound in some accents. Someone said 'Java (r)Options' which when I asked they didn't even realise they were adding it. Both this R and N in an seem to be used break the continuity of vowels between words.

at1as 1 day ago |

english is my second language, but I learned it early enough that I didn't have to study the rules (and it more or less replaced my mother tongue).

Years later a friend who was learning english asked me the difference between "a" and "an" and I realised I had no idea. I know when to use each, but not the rule governing why.

Fascinating how different the experience learning a language can be when do you explicitly, through learning the structure and rules, versus via immersion where you know what's right, but perhaps not why.

docheinestages 1 day ago |

This is exactly what language models are good at. It's not a problem that could be solved purely deterministically, because it requires knowledge of the actual pronunciation in that particular language or dialect. There can be so many exceptions to the rule, so it's just easier to train a small language model on a sufficiently large dataset.

anArbitraryOne 1 day ago |

Good, but having a plot subtitle "Tree style visualization of the first two letters of a word Visualization showing whether the first two letters of a word are enough to determine whether it should have “a” or “an”" isn't very informative. Tell me how to read it

olexsmir 1 day ago |

As a native speaker of a language without articles, I understand how articles work, I know(or at least knew at some point) the grammar, but I still omit them unintentionally. And the most frustrating part is that I use English every single day, probably even more than my native language.

seydar 1 day ago |

For those looking for a satirical scientific treatise of "a" vs "an": https://specgram.com/PsQ.XVI.4/06.pulju.indefinite.html

nikolay 1 day ago |

English is so much easier than, let's say, Greek, Russian, or French (at least these I know firsthand). Even Bulgarian, my native language, which is simpler than Russian, is much harder than English, with a lot more things to memorize. Two things in English take time: punctuation and vocabulary (with all the nuances of words). Everything else is easy-peasy!

tarkin2 1 day ago |

He says he should have used an LLM to write his one-off code

I guess this is a common idea now

Yet since a lot of our coding is for one-offs then we are allowing LLMs to blunt our skills

dataflow 2 days ago |

Any verdict for "historic"?

hiccuphippo 1 day ago |

So is it "a historic" or "an historic"? I've heard Stephen Colbert use "an historic" with a non-silent H.

mkatx 2 days ago |

I always wondered if some uses of the word 'and' I notice on occasion might have similar explanations, or if they were the result of misspelling, mistyping, incorrect autocorrect, etc.. anyone know?

Examples from published articles: "Barely half and hour was on the clock" "the hospital, which is in and area of central Homs" "spiraled into and armed uprising and civil war" "During and interview with ABC in July"

prometheus1992 2 days ago |

I can tell you did not use AN llm to write this post. Thanks.

jan_m_savage 1 day ago |

Every language has its own quirks. In Chinese, you don't have this a/an difficulty, but the grammatical tenses are so fluid that a lot of contextual cues are needed to make sense whether "I went" [zoule 走了] means I really went in the past, or I am going now (ignoring the semantic diff as well, since zou also means to pass away).

loloquwowndueo 2 days ago |

> for some words, we use an. For example, an apple.

The rule is fairly simple as it was taught to me - if the word (apple) begins with a vowel sound, use “an” to avoid cacophony. Same way one uses “o” (means “or” in Spanish) but “u” if the next word begins with a vowel.

What matters is the sound though, not the character - so it’s not as trivial to algorithmize. Eg. A hammock, an hour.

penguin_booze 1 day ago |

If pay attention to some americans speaking, you'll notice that they find it hard when and where to use 'an' vs. 'a'. You'll hear things like 'a example', 'a understanding' etc. English is hard (for some).

antfarm 1 day ago |

Funny how that short article has a sentence where an article that should be there is omitted. "The word <unicorn> starts with vowel letter..."

When I see this, I always assume the author to be Russian.

nivertech 1 day ago |

  “a San Francisco startup” /ə ˌsæn frənˈsɪskoʊ ˈstɑɹtˌʌp/
  vs
  “an SF startup” /ən ˌɛsˈɛf ˈstɑɹtˌʌp/
i.e. you have to mentally pronounce the phrase before choosing which form of the indefinite article to write

jwally 1 day ago |

What about "An honorable man" spoken with an American accent? British accent?

Dialects and syntax are weirdly fascinating .

tikhonj 1 day ago |

One fun thing is that some words can reasonably go either way: "a hotel" vs "an hotel" or "a SQL query" vs "an SQL query".

pvillano 2 days ago |

"a whole nother" is one of my favorite linguistic quirks.

zem 2 days ago |

"if words starts with hones" fails for "hones" itself; I suspect that should have been "honest" in the code.

pyuser583 2 days ago |

That’s confusing because I was taught whether something is vowel or consonant is the spoken, not written, truth.

outlore 1 day ago |

An actual use case for Jev?

puchatek 1 day ago |

Grammar Nazi here. The first sound in unicorn is a semivowel, not a vowel. You're welcome!

moritzwarhier 2 days ago |

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.

steve_taylor 1 day ago |

It really grinds my gears when someone says “an year”.

undefined 2 days ago |

undefined

kstrauser 2 days ago |

Confession: Whenever I hear an American say "an historic...", pronouncing the "h", I roll my eyes at the pretense. That's the only word I think I've ever heard someone swap in "an" for "a" before a pronounced consonant.

Now, if they used the British-style "an 'istoric event", that's fine. In American we don't pronounce the "h" in "herb", so someone here saying "an herb garden" would follow the rule correctly and sound normal.

But "history" with the full "h"? To me it screams "this person memorizes without understanding", or at least "this person desperately wants to sound posh but fails". It's the verbal equivalent of wearing a polo shirt with a giant logo, imagining if a tiny one is fancy, then an enormous one must surely be exactly what rich people would wear.

jonplackett 2 days ago |

A while ago I made an algorithm to swap the gender in fairy stories.

(Genderswappedstories.com)

And I found another English weirdness trying to swap between his/him and her/hers.

Him always swaps to her

Eg it was him - it was her

But his can swap to her or hers

It is his -> it is hers

It is his thing -> it is her thing.

And her can also swap to him or his

It was her -> it was him

It was her thing -> it was his thing

And hers always swaps to his.

So hers and him are the only completely predictable - and they don’t even mean the same thing!

I had to write a very in-depth algorithm to work out the type of words surrounding the words - if they are nouns, adjectives etc - in each sentence to correctly guess the swaps. But even after that some were unpredictable due to word order keeping the important words apart. all I could do 100% reliably was to flag the ones that might be ambiguous to check. Of course now I could just get an LLM to check it!

Can anyone explain why this happens?

gigatexal 1 day ago |

I’m glad this was posted. I’ve always wondered about this but was either too lazy or too afraid to look it up.

chistev 1 day ago |

A honest or an honest?

revexos 1 day ago |

impressed and curious

nephihaha 2 days ago |

I notice "an" is in decline in some forms of spoken English. I noticed this shift years ago. Some English speakers say "a (y)apple" rather than "an apple" or "a(y) orange" rather than "an orange". In some case the "y" sound is replaced by a glottal stop (a' apple, a' orange).

[Why is this getting voted down? Bizarre.]

kichimi 2 days ago |

I've spent some time thinking about this before, and it provides a clue about the writers accent. For example:

"An 'H'", and "a 'H'" are both equally valid following this rule (by my interpretation), depending on how you pronounce the letter 'H'.

mococa 2 days ago |

As a non speaker, I really hate this rule

habanany 2 days ago |

[dead]