WP Calais Archive Tagger

The Calais Archive Tagger plugin automatically goes through your archives and tags every post you’ve written. The plugin uses the Open Calais API to perform semantic analysis of your post text and suggest tags. If a post already contains a suggested tag, that tag isn’t added, but other new tags found are. It takes about 5 minutes to tag 200 posts.

Also see the Calais Auto Tagger plugin, which adds tag suggestion to your post writing screen. These two plugins work together to make tagging both new and past content simple, but can be used separately as well.

Calais Archive Tagger

The Calais Archive Tagger requires you have an Open Calais API key. Getting a key is easy as filling out two forms — it’s an instant, automated process. First, go to the Open Calais site and use the “Register” link at the top of the page to create an account. Then, request an API key by filling out this form. Enter your API key on the Calais Configuration tab of your plugins page.

Calais Archive Tagger is compatible with WordPress 2.3+ and WordPress 2.5+ blogs. It is free for personal and commercial use, but may not be redistributed without permission. Please e-mail me if you want to do that.

Current Version

Version: 1.4
Release Date: 3/23/2009
Download: WP Calais Archive Tagger at the WordPress Codex

Version 1.1 adds a rate limiter (2 posts processed per second) to ensure you don’t exceed the Calais API rate limit (2 requests per second and 40,000 requests per day). I’ve also wrapped the API call in a try/catch block so any exceptions won’t result in a loop condition. Version 1.2 adds a check to make sure old tags are never lost when adding new ones, and no longer adds e-mail addresses found as tags.

Notes

I recommend backing up your WordPress database before using this for the first time. There is no risk of damaging the database, as this plugin uses WordPress API functions to add the tags (no direct database access), but if you’re not happy with the tags it adds, you may want the ability to undo the additions easily.

This plugin relies on the Open Calais Tags PHP class, which requires PHP 5 web hosting with PHP’s cURL extension enabled (the majority of web hosts). Also see my blog stats plugin for W3Counter.

Installation

Unzip the archive and upload the files to your wp-content/plugins directory. Then activate the plugin from the plugins tab of your WordPress administration area. You’ll now have a “Calais Archive Tagger” link on your plugins menu where you can enter your API key and start the tagging process.

76 comments

  1. April 18th, 2009

    Hermann wrote —

    I did find a way to skip posts…. you must change the first javascript call from (0) to whatever you want.

  2. May 1st, 2009

    Blogger Tips wrote —

    loved the plugin but l agree with chriss, plugin should/have to own more features like tagging posts for last #number of posts or tagging posts for lat week or for this month or taggingg posts between dates it is very important tagging posts with dates otherwise starting tagging from beginning to last is a waste of resources and time for everytime… why l say it cos l am using some automatic rss fetching plugins like wp-o-matic and l try to tag them with ur plugin so l made a cron job to runeverynight but cos of the number of posts cron doesnt work cos l have around 2500 posts and getting more daily which sounds impossible to rub tagging from beginning to last everytime or it stops or use very high resources or firefox cant stand it and crash down of ram useage.
    what l advice is very important for the future career of ur plugin.
    Tagging between dates, tagging for last xx posts or tagging for last xdays, xweeks, xmonths are very important.
    Also the cron u specify for this plugin also should include the features l showed, if l set a cron to run every monday of week, cron should tag for the posts in the week only.. :)
    l wish its possible what l say here :)
    good luck…

  3. May 3rd, 2009

    Ariel wrote —

    Hi Dan,
    Your plugin is a great idea, but It didn’t work for me.

    Here is my hosting info:
    I’m running WP 2.7.1
    I’ve my blog inside /blog directory
    PHP Version 5.2.0
    cUrl enabled (libcurl/7.11.2 OpenSSL/0.9.7f ipv6 zlib/1.2.1)
    My blog is in spanish language
    I don’t have installed the plugin calais-auto-tagger

    The error:
    When I start the process, it shows me an empty message (no tags detected) for each post, like this:

    Tagged post #32:
    Tagged post #33:
    Tagged post #34:

    Can someone help me with this issue?
    Thanks, Ariel

  4. May 4th, 2009

    Dan wrote —

    The plugin is working, Calais is just returning no tags. It probably doesn’t work for your language, or requires you to tell it the language, which the plugin can’t automatically do.

  5. June 11th, 2009

    LEIVA wrote —

    Wow this plugin works great i download it tonight and work perfect, but is possible to run it with a cron job ? or something similar without the cron job to scan for new post each day and add the tags automatically i have so many blogs and all the blogs i run with WP-o-Matic without the cron job and i don’t want to login in each blog to click the Tagger, is any way to run the tagger automatically with out to login to each blog ? Thanks

  6. June 21st, 2009

    sikiş wrote —

    This plug in is awesome. but my api dont worked :S

  7. July 17th, 2009

    FlashLight wrote —

    I tried the Auto Tagger, and would give me language not supported errors; then I thought I should use the Archive Tagger first. It would hang on post #4. Then I disabled the Auto Tagger.

    The Archive Tagger is working just fine, producing tags (maybe some need a revision), but does not add them to the posts. At least I can’t figure how to add them to posts.

    Can anyone help?

    Thx.

  8. July 22nd, 2009

    FlashLight wrote —

    Some waiting is required. The result is not delivered immediately.

    Sorry.

  9. August 18th, 2009

    Simon Whatley wrote —

    Hi Dan

    I am running WP2.8.4 and have installed your Calais Archive Tagger.

    I have installed a valid OpenCalais API key as I aslo run your other Calais plugin, successfully.

    When I start the process, it shows me an empty message (no tags detected) for each post, like this:

    Tagged post #3:
    Tagged post #3:
    Tagged post #3:
    Tagged post #3:

    I am running on PHP 5.2.9

    cURL is enable with the following information:
    libcurl/7.19.4 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5

    My blog is inside a sub-directory named “blog”.

    Can you tell me what may be wrong? Unlike other commenters, I am running an english-language blog with approximately 250 posts.

    Thanks,
    Simon

  10. August 19th, 2009

    Simon Whatley wrote —

    The solution appears to be given by @flashlight. The archive tagger does not work if the auto tagger is also active. Deactivating the autor tagger then the archive tagger will run fine.

    Only a minor headache! Great functionality though, thanks Dan.

    Thanks

  11. August 25th, 2009

    Apurv wrote —

    Hi! This is a lovely plugin but I have a question.

    Does it _replace_ the original tags of the archived stories or only _adds_ to them?

  12. September 16th, 2009

    Mark wrote —

    Hi, I have been trying out this plugin on my site which is using wordpress 2.8.4

    Everything is fine, except for one thing, which isn’t fatal but does interrupt my flow.

    Archive tagger picks nice keywords etc. It saves the updated post just fine, but when I click on the Update Post/Publish Post button I get the following error:
    Error 500 – Internal server error

    An internal server error has occured!
    Please try again later.

    I don’t get this for anything else. I tried uninstalling the plugin and the error went away, but came back when I reinstalled it.

    I had a looky around the permissions, and they all seem to be as one would expect, so I’m a little foxed right now. Any thoughts?

  13. September 16th, 2009

    Mark wrote —

    Dan, I take back everything I just said! I was using the taggaroo plugin!
    Sorry,
    Mark

  14. View Comments: 1 2

Leave a Comment