Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

Acrobot

Ian Lloyd has a very neat new tool on Accessify: Acrobot, an abbreviation and acronym generator. It takes a chunk of text and wraps any recognised abbreviations or acronyms in the appropriate tag, with the expanded term as the title (it can also optionally just use IE friendly acronyms). It shames me to say that after a good 6 months of using these tags I’m still doing them by hand, so Acrobot is just what I need (at least until I get something similar working in my blogging system). Registered Accessify members can expand the tool’s dictionary, so maybe I’ll have to bite the bullet and sign up for yet another web site account...

A suggestion: How about making the dictionary (already available in table form) available in some kind of easily parsable format (comma delimited, tab seperated or XML) so people constructing their own tools can use it instead of building their own?

Bug report: While I didn’t manage to catch it out with pre-marked-up acronyms, the XML) in the above wasn’t converted.

This is Acrobot by Simon Willison, posted on 23rd April 2003.

View blog reactions

Next: Big news from Six Apart.

Previous: Supporting Conditional GET in PHP

2 comments

  1. I've got a PHP version of this but my approach is too brute force, and will get slower with each additional acronym. It does only markup the first acronym and puts a span around additional ones (for presentational purposes). The approach I'm using now has advantages and disadvantages, the main disadvantage being the scalability and it currently only supports acronyms, but on the plus side it allows mixed case and other odd definitions, like IPv6 or SxSW, which the other approach I considered (regex 2+ capital letters/numbers, see if that's in an array) wouldn't support. It can also potentially pick up "acronyms" inside of HTML, so once I figure out the best approach I'm going to roll it in with Texturize's HTML skipping.

    Matt - 23rd April 2003 18:01 - #

  2. I had implemented this functionallity for phpBB's BBCode, so I decided to modify that code to work with html tags. My approach (which is based of the phpBB word replacement code) is different to Matts, and I am not sure how it compares speedwise. Maybe I will check it out later. ;) You can read more on my site CodeMonkeyX.net

    Nick - 26th April 2003 07:59 - #

Comments are closed.

Previously hosted at http://simon.incutio.com/archive/2003/04/23/acrobot

A django site