license key must now be passed in rather than loaded from YAML file
[ruby-calais.git] / README.txt
blob339264534d0fc653b93a732d894e1242a800a5ad
1 Calais
2   by Abhay Kumar
3   http://opensynapse.net
5 == DESCRIPTION:
6   
7 A Ruby interface to the Open Calais API (http://opencalais.com)
9 == FEATURES/PROBLEMS:
11 * Accepts documents in text/plain, text/xml and text/html format.
12 * Basic access to the Open Calais API's Enlighten action.
13         * Output is RDF representation of input document.
14 * Single function ability to tag a document and receive a response in RDF format, names in the document, and their relationships.
16 == SYNOPSIS:
18 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:
20   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 => :text, :license_id => LICENSE_ID)
22 This is the easiest way to get the RDF-formated response from the OpenCalais service.
24 If you want to do something more fun like getting all sorts of fun information about a document, you can try this:
26   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 => :text, :license_id => LICENSE_ID)
28 This will return an object containing the RDF representation of the text, the names in the text, and any relationships that exist there.
30 == REQUIREMENTS:
32 * Ruby 1.8.5 or better
33   * Uses the following standard libraries: digest/sha1, net/http, yaml, cgi
34 * Hpricot
36 == INSTALL:
38 TODO
40 == LICENSE:
42 (The MIT License)
44 Copyright (c) 2008 Abhay Kumar
46 Permission is hereby granted, free of charge, to any person obtaining
47 a copy of this software and associated documentation files (the
48 'Software'), to deal in the Software without restriction, including
49 without limitation the rights to use, copy, modify, merge, publish,
50 distribute, sublicense, and/or sell copies of the Software, and to
51 permit persons to whom the Software is furnished to do so, subject to
52 the following conditions:
54 The above copyright notice and this permission notice shall be
55 included in all copies or substantial portions of the Software.
57 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
58 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
59 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
60 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
61 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
62 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
63 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.