Re: [PHP] Name Capitalization

2007-04-29 Thread Leonard Burton
Hi Paul, [comments below inline] On 3/19/07, Paul Novitski [EMAIL PROTECTED] wrote: At 3/19/2007 07:17 PM, Leonard Burton wrote: What my case is that I have came across a list of names that I need to use and all of the names were in caps. From there anything is a step in the right direction.

Re: [PHP] Name Capitalization

2007-03-25 Thread Tijnema !
On 3/24/07, Paul Novitski [EMAIL PROTECTED] wrote: At 3/23/2007 07:27 PM, Richard Lynch wrote: In this case, the OP has an existing list of names he wants to de-capitalize, not an ongoing stream of new names from people who might be trained. The solution remains: Hire a human. The

Re: [PHP] Name Capitalization

2007-03-24 Thread Paul Novitski
At 3/23/2007 07:27 PM, Richard Lynch wrote: In this case, the OP has an existing list of names he wants to de-capitalize, not an ongoing stream of new names from people who might be trained. The solution remains: Hire a human. The computer will never get accurate enough. The exception

Re: [PHP] Name Capitalization

2007-03-23 Thread Paul Novitski
At 3/21/2007 04:57 AM, Shafiq Rehman wrote: Some problems are universal and we cannot fix them in computer science. I think it's better to educate/guide your visitors about such names that they write in correct capitalization In this case, the OP has an existing list of names he wants to

Re: [PHP] Name Capitalization

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 1:03 pm, Paul Novitski wrote: At 3/21/2007 04:57 AM, Shafiq Rehman wrote: Some problems are universal and we cannot fix them in computer science. I think it's better to educate/guide your visitors about such names that they write in correct capitalization In this case,

Re: [PHP] Name Capitalization

2007-03-21 Thread Richard Lynch
On Tue, March 20, 2007 8:41 am, Tijnema ! wrote: What's against just capitalizing the first letter? Of course there exists a lot of different combinations where a capital letter should be, but if names are coming in like MCDONALD or mcdonald, a user would be happy if he sees Mcdonald. You

Re: [PHP] Name Capitalization

2007-03-21 Thread Tijnema !
On 3/21/07, Richard Lynch [EMAIL PROTECTED] wrote: On Tue, March 20, 2007 8:41 am, Tijnema ! wrote: What's against just capitalizing the first letter? Of course there exists a lot of different combinations where a capital letter should be, but if names are coming in like MCDONALD or

Re: [PHP] Name Capitalization

2007-03-21 Thread Shafiq Rehman
Hi, Some problems are universal and we cannot fix them in computer science. I think it's better to educate/guide your visitors about such names that they write in correct capitalization Regards -- Shafiq Rehman (ZCE) http://phpgurru.com | http://shafiq.pk On 3/21/07, Tijnema ! [EMAIL

Re: [PHP] Name Capitalization

2007-03-20 Thread Jochem Maas
Leonard Burton wrote: HI Chris, Here is one option. Make a long list (array) of search/replace pairs and loop through your text replacing as necessary. 'mcdonald' = 'McDonald' 'mcdowell' = 'McDowell' 'o\'reilly' = 'O\'Reilly' 'de la rosa' = 'De La Rosa' etc ad nauseum... I think the

Re: [PHP] Name Capitalization

2007-03-20 Thread Satyam
- Original Message - From: Jochem Maas [EMAIL PROTECTED] To: Leonard Burton [EMAIL PROTECTED] Cc: Chris W. Parker [EMAIL PROTECTED]; PHP php-general@lists.php.net Sent: Tuesday, March 20, 2007 11:09 AM Subject: Re: [PHP] Name Capitalization Leonard Burton wrote: HI Chris, Here

Re: [PHP] Name Capitalization

2007-03-20 Thread Tijnema !
: Tuesday, March 20, 2007 11:09 AM Subject: Re: [PHP] Name Capitalization Leonard Burton wrote: HI Chris, Here is one option. Make a long list (array) of search/replace pairs and loop through your text replacing as necessary. 'mcdonald' = 'McDonald' 'mcdowell' = 'McDowell' 'o\'reilly' = 'O

Re: [PHP] Name Capitalization

2007-03-20 Thread Richard Lynch
On Tue, March 20, 2007 5:41 am, Satyam wrote: JOSE DE LA ROSA = Jose De La Rosa FRANK DE BOER = Frank de Boer this actual example may not be valid Indeed, it is not. The correct capitalization is José de la Rosa. At least in Spanish the rules are quite simple, unless someone is actually

[PHP] Name Capitalization

2007-03-19 Thread Leonard Burton
HI All, Does anyone use a library to properly capitalize last names? For instance, McDonald needs to remain that way even if it comes in as MACDONALD, or macdonald. Of course I can write it on my own but would prefer not to reinvent the wheel. Thanks, -- Leonard Burton, N9URK

Re: [PHP] Name Capitalization

2007-03-19 Thread Tijnema !
On 3/19/07, Leonard Burton [EMAIL PROTECTED] wrote: HI All, Does anyone use a library to properly capitalize last names? For instance, McDonald needs to remain that way even if it comes in as MACDONALD, or macdonald. Of course I can write it on my own but would prefer not to reinvent the

Re: [PHP] Name Capitalization

2007-03-19 Thread LeaseWeb - Poelwijk
Hello. You could use the ucfirst() function for most names: http://nl2.php.net/manual/en/function.ucfirst.php But that would make Mcdonald and not McDonalds Regards, Sander Poelwijk Leonard Burton wrote: HI All, Does anyone use a library to properly capitalize last names? For instance,

Re: [PHP] Name Capitalization

2007-03-19 Thread Jochem Maas
Leonard Burton wrote: HI All, Does anyone use a library to properly capitalize last names? For instance, McDonald needs to remain that way even if it comes in as MACDONALD, or macdonald. for starters you'll have a hard time getting any routine to 'correct' the missing 'a' -

[PHP] Name Capitalization

2007-03-19 Thread Leonard Burton
HI Guys, Oops, I messed this request up. It should have read: For instance, McDonald needs to remain that way even if it comes in as MCDONALD, or mcdonald. probably any wheel out there is going to be fairly lame, yours included, no offence meant as to your skills, it's just that I believe

RE: [PHP] Name Capitalization

2007-03-19 Thread Chris W. Parker
On Monday, March 19, 2007 10:24 AM Leonard Burton mailto:[EMAIL PROTECTED] said: For instance, McDonald needs to remain that way even if it comes in as MCDONALD, or mcdonald. [snip] Yeah, nothing is a perfect solution but anything is better than nothing. That's probably true when you're

Re: [PHP] Name Capitalization

2007-03-19 Thread Leonard Burton
HI Chris, Here is one option. Make a long list (array) of search/replace pairs and loop through your text replacing as necessary. 'mcdonald' = 'McDonald' 'mcdowell' = 'McDowell' 'o\'reilly' = 'O\'Reilly' 'de la rosa' = 'De La Rosa' etc ad nauseum... I think the better solution would be some

Re: [PHP] Name Capitalization

2007-03-19 Thread Robert Cummings
On Mon, 2007-03-19 at 15:33 -0400, Leonard Burton wrote: This project shouldn't be that hard as there are probably only 10 to 15 rules for names. Ummm, April 1st is still almost 3 weeks away. Cheers, Rob. -- .. | InterJinn

Re: [PHP] Name Capitalization

2007-03-19 Thread Paul Fierro
On 3/19/07 12:24 PM, Leonard Burton [EMAIL PROTECTED] wrote: Yeah, nothing is a perfect solution but anything is better than nothing. Guys, Thanks for the replies and the link to the recent thread, even though that didn't discuss any solutions to the problem I am asking about (other than to

Re: [PHP] Name Capitalization

2007-03-19 Thread Richard Lynch
On Mon, March 19, 2007 11:22 am, Leonard Burton wrote: Does anyone use a library to properly capitalize last names? For instance, McDonald needs to remain that way even if it comes in as MACDONALD, or macdonald. Of course I can write it on my own but would prefer not to reinvent the wheel.

Re: [PHP] Name Capitalization

2007-03-19 Thread Richard Lynch
On Mon, March 19, 2007 12:24 pm, Leonard Burton wrote: Oops, I messed this request up. It should have read: For instance, McDonald needs to remain that way even if it comes in as MCDONALD, or mcdonald. You're wrong. You're wrong, because for some people, it is NOT capitalized McDonald,

Re: [PHP] Name Capitalization

2007-03-19 Thread Paul Novitski
Applying capitalization rules to names by itself is easy. What defeats the effort is that there are no consistent rules for name capitalization, only inconsistent ones. MacDonald and Macdonald are both common and are both correct. de la Rosa, De la Rosa, De La Rosa, Delarosa. Van der Berg,

Re: [PHP] Name Capitalization

2007-03-19 Thread Leonard Burton
HI Paul, Thanks for the reply. Applying capitalization rules to names by itself is easy. What defeats the effort is that there are no consistent rules for name capitalization, only inconsistent ones. What my case is that I have came across a list of names that I need to use and all of the

Re: [PHP] Name Capitalization

2007-03-19 Thread Paul Novitski
At 3/19/2007 07:17 PM, Leonard Burton wrote: What my case is that I have came across a list of names that I need to use and all of the names were in caps. From there anything is a step in the right direction. As you know, anytime you parse anything in bulk there will be exceptions to the rule.