Best way to replace upper-case with title/proper case
Posted: Thu Jan 22, 2009 1:08 am
I've just paid for TextPipe Pro, despite the lack of response to either pre-sales support questions and "in-software chat," and despite the fact that both telephone numbers (US toll-free and Australian direct-dial) are not answered with any company name. It is clearly very useful software, even if I never get support from DataMystic.
Here's the question I didn't get answered: What is the best way to convert UPPER CASE TEXT to "Proper" or "Title" case text? I am working with a large number of merchant datafeeds, some of which contain some product titles in ALL CAPS, and some of which contain titles that have indidual words in CAPS. I want to "fix what's broken, and not fix what's not broken." So what I want is:
(1) If the title contains only UPPER CASE letters, then convert the entire title to Proper case.
(2) If the title contains some lower-case letters, but contains any ALL-CAPS words longer than __ characters, convert that word to Proper case. (I'm not sure whether to say 4 or 5 characters.)
It's important to me that I not attempt to convert listings already in "reasonably OK" case; if I just convert everything to Proper Case, then I'd need more filters to fix capitalization of articles (e.g. "Gone With The Wind").
Examples:
"TOP GUN MOVIE POSTER" --> "Top Gun Movie Poster"
"REEBOK Air Jordan Basketball Shoes" --> "Reebok Air Jordan Basketball Shoes"
"Gone with the Wind MOVIE POSTER" --> "Gone With the Wind Movie Poster" (not "Gone With The Wind Movie Poster")
"Chrommatic ARG 368D digital camera" --> unchanged
"OSHA Compliance Manual" --> unchanged
Thanks for any help.
Here's the question I didn't get answered: What is the best way to convert UPPER CASE TEXT to "Proper" or "Title" case text? I am working with a large number of merchant datafeeds, some of which contain some product titles in ALL CAPS, and some of which contain titles that have indidual words in CAPS. I want to "fix what's broken, and not fix what's not broken." So what I want is:
(1) If the title contains only UPPER CASE letters, then convert the entire title to Proper case.
(2) If the title contains some lower-case letters, but contains any ALL-CAPS words longer than __ characters, convert that word to Proper case. (I'm not sure whether to say 4 or 5 characters.)
It's important to me that I not attempt to convert listings already in "reasonably OK" case; if I just convert everything to Proper Case, then I'd need more filters to fix capitalization of articles (e.g. "Gone With The Wind").
Examples:
"TOP GUN MOVIE POSTER" --> "Top Gun Movie Poster"
"REEBOK Air Jordan Basketball Shoes" --> "Reebok Air Jordan Basketball Shoes"
"Gone with the Wind MOVIE POSTER" --> "Gone With the Wind Movie Poster" (not "Gone With The Wind Movie Poster")
"Chrommatic ARG 368D digital camera" --> unchanged
"OSHA Compliance Manual" --> unchanged
Thanks for any help.