(Tutorial) Introduction to Calais

Tutorial : Introduction to Calais

How does it work?

To get an idea of how it works, chuck some text at http://viewer.opencalais.com/. For example, here's a Wikinews teaser about President Obama:

Calais Example

It correctly identifies the topic of the article as "Politics," "Washington,United States" as a "City" that the article is about, "Barack Obama" and "George W. Bush" as "Person" entities, and even finds a quotation by George W. Bush (though sadly, not as entertaining as some). Pretty nifty!

So, wanna wire this up with Drupal? Let's find out how!

Stuff you will need Installation
  1. Download and extract the Calais and RDF modules into your modules directory, as per usual (typically, sites/all/modules/calais and sites/all/modules/rdf).
  2. Download and extract the ARC 2 library to a "vendor" folder in the RDF module's directory (sites/all/modules/rdf/vendor/arc).
  3. Enable the following modules:
    • Calais package
      • Calais
      • Calais API
    • RDF package
      • RDF
Configuration
  1. Navigate to Administer >> Site configuration >> Calais Configuration (admin/settings/calais) and enter your Calais API key.
  2. Click the Calais Node Settings tab (admin/settings/calais/calais-node). There are several collapsed fieldsets here: "Global" and another one for each content type on your system.
  3. Next, you have to turn on Calais processing on one or more of your content types. Expand one of the content type fieldsets (for example, "Story") and select the type of Calais processing that should be done: whether Calais should merely suggest terms (visible on a tab), or automatically apply the terms it discovers, either once when the content is first inserted, or each time the content is updated.

    You can also play with the Relevancy Threshold setting. This dictates at what confidence level a tag will get applied to the node, from 0% (tag it with whatever tags Calais comes up with) to 100% (only the tags it's really sure about).

| Read more..

Courtesy: Lullabot.Com