Creating a TextExpander AutoCorrect Group

Philip Blog, News

In version 4 of TextExpander, we added new AutoCorrect snippet groups for German and French. Andreas Zeitler, of  zCasting 3000, is an avid TextExpander user, so we asked him to create these groups. Andreas learned a lot about along the way, and shares his tips in this post.—–This is how the German AutoCorrect snippets came to existence. I’m sharing this in hopes of inspiring other TextExpander enthusiasts to build an AutoCorrect for their native language.The project was segmented into the following sections and took me about three weeks from beginning to end.

Research

To start this project I first had to find words that are actually often mistyped. Here’s a list of common typos.Although helpful, this wasn’t exactly what we wanted for AutoCorrect. AutoCorrect should correct common typos. Even though scientific language, for instance, may be more complicated to write, AutoCorrect is about the words that are easier to mistype.I looked at websites for typing courses. These often had a list of typos their students made. The first really big list, however, I found in the real world: our library. I mustn’t be the first person with this problem and sure enough there was this book:(Taken with picfx)My advice: try to think creatively. Use different search terms on Google. Use colloquial words for “typo” to broaden your research.In German that would be “Vertipper”, which means “to type wrong”.

Edit

We set a goal of 500 snippets total. This meant not every word found would have made it into the final product. Find as many words as possible, though. You can always delete them in the testing phase.For the “typo lists” mentioned, I simply used Safari. You can just select a table, and copy-and-paste its values into an OpenOffice document.Save everything as CSV, use double quotes as text delimiter and comma as field delimiter when saving. (The default. Save as > Text CSV > Edit filter settings)I wrote a Ruby script (long time ago) which takes a CSV and creates a TextExpander file. I modified this script for the AutoCorrect project to support a third column in the CSV for TextExpander’s Adapt to Case feature. Example:
to copmute  to compute    adapt 
tpander     TextExpander  insensitive 
Macbook     Macbook       sensitive 
Learn more about the Adapt to Case feature in the documentation.Use case sensitive expansion for words that would be expanded to the same word when typed correctly, e.g. “MacBook” from the example above. This way users won’t get corrected for words they actually didn’t mistype.See the GitHub repository for usage instructions and a download. You’re welcome to improve this script!

Test

To test the snippets for correctness simply try to use them. Write blog posts, emails, letters, etc…. Using them is the best way to find conflicts.You can also try to find friends who type a lot. (Many thanks to Sascha and Nadine who helped with German AutoCorrect.)Here’s what you need to look out for:
computetion computation adapt 
Let’s assume this word is in the AutoCorrect list. It obviously would cause conflicts when a user intends to type “computer”. As soon as the user finishes typing the last “e” he or she would be “corrected” to a word they didn’t want to write.The rule is: better keep the list shorter, with less conflicts, than a longer list which causes annoying corrections for users — especially multilingual users.When a word causes conflicts, it’s better to remove it.You can always keep a backup, just to be safe. Create a new group in TextExpander, set it to “Enable In: Disabled”, and move all conflicting words in there.

Ship

Think your snippet group is ready for prime time? Get in touch with Smile! They’re going to tell you how to progress further. You can send them your suggestions for additional AutoCorrect lists as well.support@smilesoftware.com Good luck! Andreas

  1. CSV is the most essential part of this project. If you think about how TextExpander works, you’re going to realize everything TextExpander does, is basically taking one form of a word, and transforming it to another.A two-column table is perfect for this job and CSV (comma-separated values) is a text-based, open format you can use to edit everywhere. 

 


Macworld: Meet the Podcasters at Smile

Philip Blog, News

It’s that time of year again. Smile will be at Macworld|iWorld this year. You’ll find us in the OS X Developer Zone (#201) and in the Mobile Applications Showcase (#818), where we’ll be showing off our iOS products.

We are also happy to announce that the popular “Meet the Podcasters” is back.  Each day at 3 p.m., we’ll host some of your favorite podcasters at the Smile kiosk in #201. The podcasters will be there to meet listeners and answer questions.Thursday, January 26, 3 p.m. – 4 p.m.Dave Hamilton & John F. BraunMac Geek GabFriday, January 27, 3 p.m. – 4 p.m.Adam ChristiansonThe MacCastSaturday, January 28, 3 p.m. – 4 p.m.Katie Floyd & David SparksMac Power UsersSmile is proud to be a sponsor of these great podcasts. Come on by just to say “hi” or chat about the Mac, iPhone and iPad. These are the experts!
(Photos, l-to-r: Dave Hamilton, John F. Braun, Adam Christianson, Katie Floyd, David Sparks)
 

Apps for Water: Developers Support charity:water

Philip Blog, Smileworthy

Smile is participating in the Apps for Water fundraiser for charity:water. All the developers will donate their revenue from app sales on December 20, 2011. charity: water is a non-profit organization that brings clean and safe drinking water to people in developing nations. 100% of public donations directly fund water projects. We really appreciate Gaucho Software's Mike Piatek-Jimenez, who did all the hard work of putting this project together. We've done a special discount of 20% on our Mac apps to encourage you to buy great software and support a very worthwhile cause at the same time. And if you already own PDFpen, TextExpander and DiscLabel, check out the other great software that is available, or consider giving gift licenses to your favorite Mac users.  


Random TextExpander Snippets Made Easy

Philip Blog, TextExpander, TextExpander Tips

http://nerdgap.com/how-to-randomly-selected-snippets-in-textexpander/ Now that TextExpander itself is AppleScriptable (as of version 3.3), there’s an easier and more flexible way to do this:

  1. Choose File -> New Group
  2. Name the new group Random
  3. Add snippets that you’d like to be chosen at random into the Random group. You can drag existing snippets from other groups into Random, or you can create snippets expressly for use in Random. Tip: if you are creating new snippets for use only as random snippets, you can save time and work by not assigning abbreviations to these snippets.
  4. Make a new snippet in a group other than the Random group
  5. Set the Content: of the new snippet to AppleScript
  6. Enter this for the snippet:
    tell application "TextExpander"
    
    	set groupCount to count (snippets of group "Random")
    
    	set randomIndex to random number from 1 to groupCount
    
    	return plain text expansion of ¬
    
    		snippet randomIndex of group "Random"
    
    end tell
  7. Set an abbreviation for this new snippet, for example: rrand
Any time you type rrand, you’ll get a random selection from among the snippets in your Random group. The advantages of this technique over the one linked above are:
  • You need not know the abbreviations for all of the snippets in advance
  • You can add to and remove from your Random group without changing anything
(Thanks to Sheree Peña of Black Pixel for the inspiration for this post.)