[Drupal] How to Implement Automatic Tagging in Contents using Calais?

| | 2 min read

Tagging a content properly will definitely cause your website's contents to come up properly in search results. Tagging can be done manually and automatically. If you are using a Drupal6 site and you want to tag your contents automatically, I know exactly what you need. For that I would prefer you read on.

Our goal is to tag the contents automatically for which we require the following modules :

We can get the modules from drupal.org and ARC2 library from https://github.com/semsol/arc2#readme.

  • Place this library in rdf/vendor and rename it as arc.
  • Oops we do require an API key for this. As opencalais is a third party interface, we need to get its API from http://www.opencalais.com/.

Now that we have all the required stuffs, Let's start working using these.

Step 1: Enable the Calais module and RDF module.

Step 2: Go to Administer >> Site configuration >> Calais Configuration. Where we can see three tabs namely Calais API Settings, Calais Node Settings, Calais Tag Modifications and Calais Bulk Processing.

Step 3: Click on the tab Calais API Settings and enter the API Key.

Step 4: Next is Calais Node Settings where we have to cook a bit.

Calais Node Settings tab gives us options in tagging the contents. This option displays the available content-types.

Step 5: Expand the content-type where we want to get the automatic tagging done. There are 2 options 'Send Calais Request' and 'Tag Content', check the required ones.

Step 6: 'Semantic Proxy' is an option where we have to consider, when our content type is a node whose contents lay in other sites. Select the corresponding field (url field).

Now that you have followed all my footprints, create a node for the content type for which you enabled the automatic tagging. If you had selected the option 'Send Calais Request' as 'MANUAL: initiate requests from the 'Calais' tab'(as per Step 5), After creating an article you can see a tab namely 'Calais' which on clicking will get your content tagged.

Hope this helps!

References:

1. http://www.lullabot.com/articles/introduction-calais