No commit activity in last 3 years
No release in over 3 years
A Ruby interface to the Calais Web Service
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.1.4
>= 1.1.3
>= 1.3.3
 Project Readme

Calais

A Ruby interface to the Open Calais Web Service

Features

  • Accepts documents in text/plain, text/xml and text/html format.
  • Basic access to the Open Calais API's Enlighten action.
    • Output is RDF representation of input document.
  • Single function ability to extract names, entities and geographies from given text.

Synopsis

This is a very basic wrapper to the Open Calais API. It uses the POST endpoint and currently supports the Enlighten action. Here's a simple call:

Calais.enlighten(
    :content => "The government of the United Kingdom has given corporations like fast food chain McDonald's the right to award high school qualifications to employees who complete a company training program.",
    :content_type => :raw,
    :license_id => 'your license id'
)

This is the easiest way to get the RDF-formated response from the OpenCalais service.

If you want to do something more fun like getting all sorts of fun information about a document, you can try this:

Calais.process_document(
    :content => "The government of the United Kingdom has given corporations like fast food chain McDonald's the right to award high school qualifications to employees who complete a company training program.",
    :content_type => :raw,
    :license_id => 'your license id'
)

This will return an object containing information extracted from the RDF response.

Requirements

Install

You can install the Calais gem via Rubygems (gem install calais) or by building from source.

Authors

Acknowledgements