I just knocked this keyword density calculator together for my own use - there are plenty online that take a URL but I wanted one to automatically show the keyword density for offline documents - in other words I wanted to paste in the entire document, not just the URL.
The checker automatically calculates the density of every word and 2, 3 and 4 word phrases, ranking the output by density. It strips punctuation and HTML - I’m sure this bit isn’t perfect but it works most of the time.
I haven’t prettied it up either, but I hope its useful to you as is.
Feel free to use the source for anything you like, with no warranty given or implied. Of course I’d always appreciate a link to www.alexpoole.name if you find it useful