A Python implementation of XKCD: Substitutions http://xkcd.com/1288/