Page 1 of 1

Speak titles rather then spell

Posted: Sun Mar 17, 2013 4:43 am
by john.goley
Many books or articles have chapter titles or the first few words of the chapter in all caps. For example; "I AM ..." is said "I A.M...." rather than "I am..." or "ON THAT DAY....." is said "O.N. that day..." rather than "On that day..."

I know there is a regex expression that can fix this, because I have seen it on this forum and used it in the past, but.... I have searched for it 6 ways to Sunday and cannot find it.

Any help?

John

Re: Speak titles rather then spell

Posted: Mon Mar 18, 2013 9:10 am
by Jim Bretti
Hi John

It sounds like you're looking for something to convert upper case text to lower case. One thing you can do is create a pronunciation dictionary entry that uses a regular expression to match uppercase words of a given length. Then, specify the "Pronounce As" dropdown to "Respel", and in the respell field, use a special function to convert text to lower case.

Just for example, we'll assume hear that you want to convert upper case words between 2 and 4 characters long (you can set this however you like)

For the Regular expression, use this:

(?<=\b)[A-Z]{2,4}(?=\b)

For the Respell field, use:

##lowercase($0)

You should also select the "Case Sensitive" checkbox.

The regular expression matches all upper case words between 2 and 4 characters in length. Lookbehinds and lookaheads are used in the expression to ensure that word boundary characters (\b) occur before and after the matched text.

Let me know if you have questions or have trouble getting this to work.