2

Is there a way to check if an a should really be an an in a sentence?

For example, it should indeed fix the following:

A apple => An apple

But the following is correct:

A urologist

In English, the correct choice of a and an depends on the initial sound of a word, not on the initial letter, of the word that they precede. The letter a should be used before all words beginning with a consonant sound except silent h (an honor) and before words beginning with vowels that represent combined consonant and vowel sounds (university, unit).

user3188544
  • 1,611
  • 13
  • 21
  • Is discriminating between 'a' and 'an' really your entire problem? Or are you really interested in a more general system? E.g., 'who' vs. 'whom'; 'it's' vs. 'its'; correcting verb forms ('I seen' -> 'I saw'); and so on (I'm sure you can come up with dozens of similar error classes). If 'a' vs. 'an' is really the entire problem, a simple heuristic like @Kunukn's is probably sensible. If you're looking for a more general solution, you might want to note that in your question. – AaronD Apr 16 '14 at 17:22

2 Answers2

3

Use a text to phonetic transcription translator and check if words starts with a vowel sound.

English phonetic alphabet http://www.phon.ucl.ac.uk/home/wells/phoneticsymbolsforenglish.htm

apple     ->  ˈæpl̩ 
urologist ->  jʊəˈrɒlədʒi 

EDIT: There are special cases which are exception to the rule.

  • an historic -> hɪˈstɒrɪk
  • an horrific -> həˈrɪfɪk
  • an hotel -> ˌhəʊˈtel

More info here http://www.oxforddictionaries.com/words/a-historic-event-or-an-historic-event

Kunukn
  • 2,136
  • 16
  • 16
1

I would go with a statistical approach, get your hands on a huge collection (corpus), and for each word in it find the number of times it was preceded by an a and the number of times it was preceded by an. (This is done once, pre-processing).

Based on the above, determine if your a should really be an an.

amit
  • 175,853
  • 27
  • 231
  • 333
  • Seems a little overkill. – user3188544 Apr 16 '14 at 06:13
  • Let's take the best of both worlds. Phonetize your corpus THEN train a language model (2nd order Markov Model should do the trick). Let's not forget that the idea is to gain knowledge about the phonology of English. (which English by the way?). Another big advantage of such a generative approach is that you can now handle unknown cases too... – Pierre Jun 04 '14 at 14:59
  • In case anyone still gets here, these were useful for me: http://stackoverflow.com/questions/1288291/how-can-i-correctly-prefix-a-word-with-a-and-an/1288473#1288473, http://home.nerbonne.org/A-vs-An – Adi Dec 01 '14 at 21:48