A versus An (programatically)

B

bernard

Hi,

Does anyone know of a way to allow Perl to determine whether a word
would require the indefinite article 'a' or 'an'. Looking at style
guides, such as the one found at:
http://owl.english.purdue.edu/handouts/esl/esliart.html
we see that it is NOT as simple as just looking for an aeiou at the
beginning of a word.

The reason I want to do this is because I am pulling a noun from a
database and want my program to be able to determine what article to
use with it. In theory, I could add a column to the table that
indicates which article is appropriate. But I was wondering if there
was a more flexible solution, perhaps based on some sort of phoenetic
routine.

Bernard.
 
A

Ala Qumsieh

bernard said:
Does anyone know of a way to allow Perl to determine whether a word
would require the indefinite article 'a' or 'an'. Looking at style
guides, such as the one found at:
http://owl.english.purdue.edu/handouts/esl/esliart.html
we see that it is NOT as simple as just looking for an aeiou at the
beginning of a word.

My biggest pet peeve is people saying "An historic event". That is just
plain wrong. Somehow, using the article "an" with the word "historic" is
seen as a sign of higher intellect. It is not!

Just needed to get that out of my system :)
Now back to your scheduled clpm programming ..
--Ala
 
W

Wes Groleau

Ala said:
My biggest pet peeve is people saying "An historic event". That is just
plain wrong. Somehow, using the article "an" with the word "historic" is

Dialects which have silent 'h' in historic
also use 'an' before it. This is correct
for them.

If the 'h' is not silent in your dialect, then
'an' is "just plain wrong" in _your_ dialect.
 
L

Lars Eighner

In our last episode,
the lovely and talented Wes Groleau
broadcast on comp.lang.perl.misc:
Ala Qumsieh wrote:
Dialects which have silent 'h' in historic
also use 'an' before it. This is correct
for them.
If the 'h' is not silent in your dialect, then
'an' is "just plain wrong" in _your_ dialect.

This has been done to death in alt.usage.english. Summary:
in some cases, people who normally pronounce their h's,
don't when the stress shifts - or at least the h may become
very minimal. So some people who do say "a history" will also
say "an historic" without affectation.
 
J

John W. Kennedy

Ala said:
My biggest pet peeve is people saying "An historic event". That is just
plain wrong. Somehow, using the article "an" with the word "historic" is
seen as a sign of higher intellect. It is not!

No, it is simply old-fashioned.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top