http://mkweb.bcgsc.ca/carpalx/

and http://sourceforge.net/projects/pkl/

Carpalx takes an input file with words and the input keyboard and runs statistical algorithms to create the most efficient (at least according to the way the author defines efficiency; there is a section on the web page describing the factors he uses) keyboard layout (for that text document).
You could just take the entire [insert language here] dictionary in a text file and produce the most efficient typing method for that language. Or, say you are a programmer and you use what are normally punctuation marks quite often. You can take code that you have written and generate an optimal keyboard layout for programming, considering you want to learn it.

What PKL is is a portable keyboard layout. It is an exe file that runs (does not need administrator access or installing anything) and lets you use keyboard layouts that you have put into the program. So, you could optimize a keyboard layout for you and then be able to use it at any computer running Windows (if you use Linux or OS X, at least Linux, you should be able to change the layout by messing with a configuration file). Ideally you would want to have a keyboard with all the letters in the layout you use so you could buy one of those roll-up keyboards if you wanted to carry around.

I suppose some people won't care much about this but I think it is pretty cool. The way some of the keys on qwerty annoy me a lot and since I am only decent at qwerty I thought it might be useful to try out another keyboard layout.