Thanks, the function works when, as you say, publish or edit a post.
1. The specific thing, here, however is, that posts are published automatically with auto rss plugin, and as they maybe between 10 and 60 every 2 hour, I'd rather not open and save every post manually. I currently assign the session (Tokyo, London, New York, Weekend) categories with Batch categories plugin, which is fast, but still manual.
2. Another thing - I use paid (few bugs) auto assign categories plugin, which assigns posts according to words in post/title which match categories. When the new function (given at http://pastebin.com/Vn6U7usD by you) is inserted, the auto assign categories plugin conflicts with it.
Can the function you suggested work, for example scan posts when activated (maybe by clicking on a link) ot at a given time by itself in order to save manual work. If you like I could also send you the auto assign categories plugin (small, 54 lines), where maybe the function can be added and categories assigned automatically together with the matching keywords.
Sorry if it's too complicated. I would understand if it's too much to deal with. Thanks again. fxswiss(AT)yahoo.com