LOGOLOG
a weblog of wordplay by Eric Harshbarger
Chemical Abbreviation Parser
For my work today I was creating puzzles that had to do with construction of words out of the abbreviations of chemical elements.
I ended up writing an algorithm that automatically parses words into their abbreviation constructions (if possible). The original I wrote in Java, but the code was so simple, really, I thought I'd convert it to a Perl script so that I could create a web form that could be made public.
You may test any word (or list of words) by entering it in the textarea below (a couple of test words are there by default). A simple text document will be returned showing all possible ways to parse the given words (the input will be limited to about 2500 characters). Enter your name and see if it is able to be parsed into chemical symbols...
By the way, I am using the names and abbreviations for the first 111 chemical elements as presented here.
-- Eric
[17 October 2006]
|