WP Calais Auto Tagger

With the Calais Auto Tagger plugin, you’ll never have to think of tags for your posts again. The plugin uses the Open Calais API to perform semantic analysis of your post text and suggest tags for you. The plugin adds a new “Get Tag Suggestions” button to your post interface which retrieves the suggestions. Adding the suggested tags takes just a click.

Calais Auto Tagger

The Calais Auto 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 Auto Tagger is compatible with WordPress 2.7+. It is free for personal and commercial use.

Current Version

Version: 1.3.1
Release Date: 11/03/2009
Download: WP Calais Auto Tagger at the WordPress Codex

Notes

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).

Installation

To install, unzip the archive and upload the files to wp-content/plugins/calais-auto-tagger. Then activate the plugin from the plugins tab of your WordPress administration area. You’ll now have a “Calais API Key” link on your settings menu where you can enter your API key.

What’s new in the latest version?

Bug fixes for scheduled posts and the visual editor.

112 comments

  1. July 24th, 2009

    Chris Merriman wrote —

    Dan, did you get a chance to read my comment above? In case it isn’t clear, your plugins worked well when I last tried them (probably closer to a year or so now), but currently aren’t returning anything when asked to suggest tags.

  2. July 24th, 2009

    Dan Grossman wrote —

    I tested this plugin on 2.8.1. It returned tags. In fact, it returned 32 tags for one of my longer posts. If it’s not working for you, you’ll need to figure out why yerself :)

  3. July 27th, 2009

    Chris Merriman wrote —

    I’d hoped you would be able to give me a small clue as to which direction to look, or perhaps some verbose debugging mode. Never mind.

    Think I may have found the issue, which probably applies to a few other users with PHP5 CURL etc. all ticked off, but find the plugin isn’t returning tags.
    You’ll just need to guess it yourself :)
    Seriously, let me check a few other blogs I run tomorrow, and I’ll let you know.

  4. July 28th, 2009

    Chris Merriman wrote —

    It looks to me as though you need to have the post open in Visual, not HTML viewing mode, if the Get Tags button returns nothing. Other sites seem to work with either Visual or HTML selected, but my main blog would only return tags when in HTML editting mode. Hope this helps a few others that are searching for the reason why this plugin wasn’t functioning 100%

  5. August 9th, 2009

    Rick wrote —

    Dan,
    Love the plugin. However one feature that would be nice is that I use some automated feeds and auto-poster and the only way I can get tags is to go back and hit get tags on each feed post. A nice option would be to have option on setup of it automactically getting and adding.
    Of course, still want the choice, since on original posts, like being able to select.
    Thanks a ton for all your work on this.

  6. August 10th, 2009

    Chris Merriman wrote —

    @Rick, if you read through the older comments here, you’ll find Dan wasn’t up for this sort of feature, as the last person to request it also used feeds and auto-generating posts. Not a criticism on my part, just giving you a heads up on previous enquiry and answer.

  7. August 13th, 2009

    uncleboob wrote —

    Ohh noo! I just registered myself at Calais and did all of the clicking and stuff – just to find out that i.e. German language is not supported. I think on my way to the registeration I could have read it somewhere but still…
    Greetings

  8. September 27th, 2009

    Ed wrote —

    Just tried to activate WP Calais Auto Tagger Version 1.2 and got this error:

    Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/peculiarblog/blog.peculiarplace.com/wp-content/plugins/calais-auto-tagger/opencalais.php on line 17

    Note: I am using WordPress 2.8.4 and also have PHP5 (hosted on Dreamhost if that makes a difference)

  9. September 27th, 2009

    Dan Grossman wrote —

    That error means you are using PHP4, Ed. Same as for everyone else that saw that error. You probably have an option to use PHP4 or PHP5 with your host and need to change it.

  10. October 1st, 2009

    Ed wrote —

    I’ve gone back and double checked and PHP5 is definitely in use, in fact, As of September 2008, support for PHP4 was discontinued on Dreamhost. It’s no longer even a choice in the domain setup edit and I migrated all of my domains to PHP 5 back in the summer of 2008.

  11. October 1st, 2009

    stella wrote —

    When i click “Get Tags” nothing appear. Please advise what to do. Thanks!

  12. October 9th, 2009

    Doug wrote —

    Archive tagger not working with 2.8 — no tags are returning to posts. Same issue as Chris Merriman. Got what the specs say I need. Any plans to fix the bug?

  13. October 12th, 2009

    Chris Merriman wrote —

    I believe we may get into the definition of a bug here. To be fair, with a free plugin, that the author can’t replicate on his own setup, troubleshooting would be difficult.
    I’d guess that ruling out the obvious causes would be a good idea – temporarily disable ALL other non WP Calais plugins, maybe even try changing themes, just in case. Re-run archive auto tagger. If it now works, abort the process. Now change themes back to your original. If archive auto-tagger still works, start re-enabling those other plugins one by one, each time obviously testing if auto-tagging still works. If/when you hit the jackpot of the guilty plugin, PLEASE post back. I intend to do this myself, but a lot of other tasks to complete first.

  14. October 27th, 2009

    Dan wrote —

    There are definitely some bugs with the auto tagger and the latest minor releases of WP. I hope to have time to revisit the two Calais plugins this week to fix them up again.

  15. October 27th, 2009

    james wrote —

    Hi Dan. Quick question, if I use your plug in, how are you managing tags with the WP database?

    Are they being classified by their respective category, e.g., NBC is identified as a company by placing it in a company column?, or are all the tags being dumped in a single cell for each post that Calais processes?

    Basically, I’m trying to get a handle on how structured the data is once the text has been processed and tags applied to it. Ultimately, I’m interested in if I’m left with a structured database that I can export for additional processing.

    Thanks so much.

    -james

  16. October 27th, 2009

    Dan wrote —

    James, tags are a built-in feature of WordPress. How it is structured is managed by WordPress and has changed over time, I can’t even tell you since I have not looked recently. This plugin just adds the tags to the form while you’re writing/editing a post, and they’re submitted the same as tags you typed by hand into the tags box. That’s how it worked before something broke the interface, at least. The archiver plugin uses WordPress’s API functions for adding tags to a post, it does not directly touch the database at all.

    In ether case, tags in WordPress are just words. There is no metadata attached to them, like the fact that a tag is a business.

  17. October 28th, 2009

    Dennis wrote —

    Hi,

    When i click “Get Tag Suggestions” nothing appear. I am using:

    Version 2.8.5 DE-Edition
    PHP5
    Calais Auto Tagger Version 1.3 DE-Edition

  18. October 28th, 2009

    Dan wrote —

    The Open Calais service is for English language text only.

  19. October 28th, 2009

    Chris Merriman wrote —

    Just wondered what the differences between 1.2 and the newly released 1.3 might be?

    Couldn’t find any notes here, or a changelog tab in WP plugin admin interface.

    Just in case the update was aimed at resolving the problems with it only working for people using the WYSIWYG editor for posts, I still can’t get it working when using (as default) the HTML view. (still hangs forever (well more than 5 minutes at least) with “Getting suggestions…” – tried with 4 reasonably long, un-tagged, posts).
    As soon as I switched to Visual edit mode for the post, and once again attempted to click Get Tag Suggestions, it worked fine.

    Archive auto tagger still also failing (whereas it used to return suggestions a long time back).
    Still slightly strange error in that it seems to flick back and forth between different posts before failing…
    for example

    Archive Tagger
    Status: Tagging in progress…
    Tagged post #6:

    Tagged post #7:

    Tagged post #6:

    Tagged post #6:

    Tagged post #6:

    Tagged post #6:

    Tagged post #6:

    Tagged post #6:

    Tagged post #6:

    Tagged post #6:

    etc. etc.

    Understand this may be due to using a more recent version of WP. Neither report meant as a moan, just a FYI, in case you’re looking for feedback on new code/existing problems.

  20. October 28th, 2009

    Chris Merriman wrote —

    ooops, just read your front page re. changes with 1.3
    Sorry for not checking properly first, though wonder if you might get a chance to see why it doesn’t work still in HTML editing mode for posts?

  21. October 28th, 2009

    Chris Merriman wrote —

    If/when you get the time, it might be an idea to put some extra error handling in the plugin as well?
    For example, instead of the following, something that a random blogger would be more likely to understand.

    Fatal error: Uncaught exception ‘OpenCalaisException’ with message ‘Calais Backend-Server is Busy. Please try again later.’ in /home2/MADEupNAME/public_html/wp-content/plugins/calais-auto-tagger/opencalais.php:109 Stack trace: #0 /home2/MADEupNAME/public_html/wp-content/plugins/calais-auto-tagger/opencalais.php(55): OpenCalais->callAPI(‘The same day (2…’) #1 /home2/MADEupNAME/public_html/wp-content/plugins/calais-auto-tagger/calais_auto_tagger.php(152): OpenCalais->getEntities(‘The same day (2…’) #2 /home2/MADEupNAME/public_html/wp-includes/plugin.php(339): calais_gettags(”) #3 /home2/MADEupNAME/public_html/wp-admin/admin-ajax.php(1352): do_action(‘calais_gettags’

    Array) #4 {main} thrown in /home2/MADEupNAME/public_html/wp-content/plugins/calais-auto-tagger/opencalais.php on line 109

    (my own fault, I was attempting to query calais’ servers on posts in batches of six at a time (decided to manually go through a post at a time, instead of waiting for auto archive to be reborn :) )

  22. October 28th, 2009

    Dan wrote —

    It works for me with the visual editor on or off, which is surprising since I don’t doubt that the code I was using to force the visual editor to save from WP 2.6 would be broken by now. If I figure out the right way to do it I’ll be sure to update the version number again so you’ll see the upgrade note in your plugin list. WP’s ability to install and update plugins itself is great.

  23. November 2nd, 2009

    Gene Steinberg wrote —

    Your new version is, frankly, less useful than the previous one. When I set a scheduled post, and choose tags, the tags are deleted when the post is life. I then have to redo the tags, which is an utter waste of time. A bug I presume.

    Can you look into it?

    Peace,
    Gene

  24. November 3rd, 2009

    Chris Merriman wrote —

    @Gene. Thanks for the heads up. I hadn’t noticed this was happening, but I happen to have scheduled posts for the next fortnight – upon checking the ones already live, the tags have gone on my blog too. Oops.

  25. November 3rd, 2009

    Dan wrote —

    A new version has been published to fix the bugs with the scheduled posts and visual editor. Please comment if you still have problems and I’ll look again.

  26. November 3rd, 2009

    Gene Steinberg wrote —

    Thanks. We’ll know tonight if this fix works.

    Peace,
    Gene

  27. November 4th, 2009

    Joe wrote —

    When I deactivate the plug-in, the entire “tag” interface is eliminated from the Add New Post page.

    Also, when the plug-in is active, I cannot simply enter a term in the tag box and hit “enter” to add that tag because by hitting “enter,” the plug-in forces the entry to be published. Finally, when I try to add multiple tags to the tag box and separate them with a comma, they are entered as one, gigantic tag.

    I would have deactivated this plug-in, but as I first wrote – the entire tagging box is eliminated when I do so!

  28. November 4th, 2009

    Dan wrote —

    Wish I had any idea how that happened, Joe. There’s no code in the plugin that changes WordPress’s tag stuff. It just sets the CSS on the tag box to display:none to hide it, and obviously that wouldn’t have a permanent effect.

  29. November 4th, 2009

    DazzlinDonna wrote —

    Might want to note that if your blog is in a subfolder (like domain.com/blog/) then the plugin doesn’t work properly, unless you edit the js.inc file to add /blog/ before /wp-content/plugins/calais-auto-tagger/images/add.png and /wp-content/plugins/calais-auto-tagger/images/delete.png (where /blog/ represents your blog’s folder name). Also, doing an upgrade to the plugin will wipe out that change, so you’ll have to edit that file after every plugin upgrade.

  30. November 4th, 2009

    Dan wrote —

    Donna, I was not able to reproduce that bug. I installed WordPress in a subdirectory and the image paths were correct, they included the subdirectory.

    Perhaps you have the URL of your blog set incorrectly in your General Settings.

  31. November 4th, 2009

    DazzlinDonna wrote —

    Hm, nope, it’s set correctly there. And this same thing happened on a friend of mine’s blog that I post on as well.

  32. November 5th, 2009

    Steven wrote —

    I just wanted to confirm that I had the same problem that DazzlinDonna posted. Adding /blog before the add and delete image lines in the js.inc file worked as a fix. Thank you DazzlinDonna.

    I know very little about how this stuff works but just wanted to mention that I had the problem on a Windows server running WordPress 2.8.5 with version 1.3.1 of the plugin downloaded through wordpress.org.

  33. November 5th, 2009

    DazzlinDonna wrote —

    It’s always good when someone confirms I’m not crazy. LOL. Since Steven supplied his info, here’s mine. Linux server, running WP 2.8.5 with version 1.3.1 of the plugin originally downloaded from wordpress.org, but then upgraded from my blog’s wp-admin.

  34. November 14th, 2009

    Joe wrote —

    Hi Dan,

    I am getting the following error on some of my sites located on one server [must be a server issue but don't know what] –
    Fatal error: Call to undefined function curl_init() in /home/myusername/public_html/wp-content/plugins/calais-auto-tagger/opencalais.php on line 99

    I have other sites on a different server and the plugin works great – thanks!

  35. November 15th, 2009

    Dan wrote —

    Joe, that server doesn’t have the cURL module for PHP installed. Your host can probably enable it for you.

  36. November 15th, 2009

    warren wrote —

    @dazzlindonna: thx for the code hack. that resolved my issue of not seeing the ‘-’ and ‘+’ sign to add or remove suggested tags.

  37. December 24th, 2009

    Randy Aldrich wrote —

    First off… (used to) Love the plugin so thanks!

    Secondly, 2 major issues stopping me from using it since the last update:

    1) It Hijacks the Wordpress ‘tags’ box. If the Calais tag box duplicated the functionality this would be perfectly fine. It doesn’t. The Wordpress tag box does some auto-filling magic. When you have thousands of tags this is vitally important. I literally cannot work without this ability. To fix it either implement the auto-filling feature in the Calais tag box or let me keep the WP Tag box (I can put it back, but every time i create a new post or edit one, it dissapears again… :( )

    2) Please make the plugin case-insensitive, or give us an option. It currently still ’suggests’ tags that I already have just because the case is different.

    Thanks,

    Randy

    PS: the second issue is just an annoyance, but the first issue makes this plugin unusable.

  38. January 4th, 2010

    Farokh wrote —

    I am not sure why, but the name Jim Swerg is constantly suggested as a tag. My last entry also received the suggestion of no.com.mercial as a possibility. I am not sure why this is happening, but every time I try your plugin, I get some inane suggestions of this nature!

  39. January 4th, 2010

    Dan wrote —

    The suggestions come from OpenCalais, I can’t help you with that

  40. View Comments: 1 2

Leave a Comment