Giter Club home page Giter Club logo

calais's Introduction

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

  • Paul Legato: Help all around with the new response processor and implementation of the 3.1 API.
  • Ryan Ong

calais's People

Contributors

abhay avatar pjlegato avatar thenaox avatar mmbenny avatar halfbyte avatar humanzz avatar jashkenas avatar jmoses avatar threedaymonk avatar ryanong avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.