Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > A versus An (programatically)

Reply
Thread Tools

A versus An (programatically)

 
 
bernard
Guest
Posts: n/a
 
      03-10-2005
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.

 
Reply With Quote
 
 
 
 
J. Gleixner
Guest
Posts: n/a
 
      03-10-2005
bernard wrote:
> 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


Lingua::EN::Inflect

http://search.cpan.org/~dconway/Ling.../EN/Inflect.pm
 
Reply With Quote
 
 
 
 
Ala Qumsieh
Guest
Posts: n/a
 
      03-11-2005
bernard wrote:
> 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
 
Reply With Quote
 
Wes Groleau
Guest
Posts: n/a
 
      03-11-2005
Ala Qumsieh wrote:
> 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.

--
Wes Groleau
Amateur linguist
 
Reply With Quote
 
Lars Eighner
Guest
Posts: n/a
 
      03-11-2005
In our last episode,
<(E-Mail Removed)>,
the lovely and talented Wes Groleau
broadcast on comp.lang.perl.misc:

> Ala Qumsieh wrote:


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


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.

--
Lars Eighner http://www.velocityreviews.com/forums/(E-Mail Removed) http://www.io.com/~eighner/
Bac'n Bits: Humans don't know it's not bacon!
 
Reply With Quote
 
Darren Dunham
Guest
Posts: n/a
 
      03-11-2005
Ala Qumsieh <(E-Mail Removed)> wrote:
> 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!


http://www.askoxford.com/worldofwords/wordfrom/aitches/

--
Darren Dunham (E-Mail Removed)
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
 
Reply With Quote
 
John W. Kennedy
Guest
Posts: n/a
 
      03-12-2005
Ala Qumsieh wrote:
> bernard wrote:
>
>> 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!


No, it is simply old-fashioned.
---
John W. Kennedy
"Sweet, was Christ crucified to create this chat?"
-- Charles Williams. "Judgement at Chelmsford"
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Mozilla versus IE versus Opera versus Safari Peter Potamus the Purple Hippo Firefox 0 05-08-2008 12:56 PM
equal? versus eql? versus == versus === verus <=> Paul Butcher Ruby 12 11-28-2007 06:06 AM
Certification - MCP versus MCSA versus MCSE =?Utf-8?B?Q2FuYWRhX0d1eU0=?= Microsoft Certification 1 08-24-2006 06:33 PM
script versus code versus ? Russ ASP .Net 1 06-10-2004 03:06 AM
HTML Client Control versus. HTML Server Control versus. Web Server Control Matthew Louden ASP .Net 1 10-11-2003 07:09 PM



Advertisments