Fork nlpTools on GitHub
nlpTools - Natural Language Processing Toolkit for PHP

API

The NLPTools API is a simple JSON over HTTP RESTful web service for natural language processing. It is especially focused on text classification and sentiment analysis.

It currently offers the following functionality:

Custom development of other domain-specific solutions are available on demand.

Usage

To analyse the sentiment of some text (in English), do a HTTP POST to http://nlptools.atrilla.net/api/ with form encoded data containing the following parameters:

On success, a 200 OK response will be returned containing a JSON object with the following attributes:

Example

Here it is an example using curl:

$ curl -d "service=sentiment_news&text=The quick brown fox jumps over the lazy dog" http://nlptools.atrilla.net/api/
{
  "likelihood":{"NEG":0.27512539950382,"NEU":0.70691780429118,"POS":0.017956796204998},
  "label":"NEU"
}

Free service limits

The public API service is for evaluating the toolkit. Input text is limited to 2000 characters and a maximum of 500 queries are allowed per IP. Higher limits (e.g., for commercial purposes) are also available: