The musician/comedian Victor Borge invented the concept (as far as I know) of “inflationary English.” The premise is that because prices are always going up, our language should also keep pace. Thus, each spoken number (including homonyms) should increase by one. So, for example, one would say, “I’m going three the store befive it closes.”
As I was preparing for a presentation on GREP for the Portland InDesign User Group I was racking my brain for good examples of GREP in action, as well as a good way to demonstrate scripts that allow multiple find/changes. It occurred to me that I could create an inflationary English converter! I used the free script XStrings and wrote a list of GREP queries.
Please note that it’s not complete, but is workable for demonstration purposes. It has a complete set of regular numbers 1-10, as well as an ordinal (“once”). Also, I took the easy way out and put the replaced text in all-caps rather than dealing with capitalized and uncapitalized words separately; otherwise, each query would have to be duplicated, once for lower case and once for capitalized. Many more queries would be needed for a complete generator.
Here is a screenshot of the XStrings screen showing the first page of my queries:
Some pretty basic GREPping going on here. the [ ] allow for any characters inside the brackets, so this takes care of capital and lowercase letters. the | character is a logical or, so it takes care of homonyms. So, for example, [Tt](00|wo|o) simply means “find the words too, two, and to, including instances starting with a capital ‘T’.”
So just clicking the “DoXStrings” will run through the entire list. Below you’ll see an example with the original paragraph on the left and inflated version on the right.