Generate Taxonomy Terms from Node Content Automatically In Wordpress there was a plugin that could auto-create tags based on node content . I don't know how it did this but perhaps it looked up the most common words in the body content and used them as the tags. I have some posts that have lost their tags and it would be great to be able to auto generate some new ones from posts with a script rather than having to go back through and manually do them.
I haven't achieved such content based node tagging programatically on my own. But used a module named Open Calais which uses the Thomson Reuters web service to generate and classify taxonomy term from node body content. Though it was available with free key use the number of API calls were limited. This with More Like This might serve some purpose in case you are running on Drupal 6.

Another module that might be of interest is Autocategorise which appears to do the same by subjecting node content to regular expression rather than a web service API like calais. If you wish to code the logic yourself examining the module's code might give some ideas on implementation.