REST API - SubhasisDutta/Text-Analysis GitHub Wiki

The REST API is provided to the diskoveror-ta package using an App server built on Play Framework. The app server could be setup by using this package https://github.com/serendio-labs-stage/diskoveror-web-interface

Syntax

Write out the full Post method and then explain the parameters.

The components of a given text could be extracted by setting the below parameters and giving a post request to the API :

   analysis  - Extracts specific text analyics data from input text. (Mandatory)

Values compatible

   All (Gives an output with all of the features resolved by the engine)                  
   Entities (Output consists of only entities resolved from the input text)        
   LSEntities (Returns Life Science entities)
   Sentiment (Gives the overall sentiment of the input text)
   Topics (Returns the categories to which the input belongs to)
   Keyword (Returns keywords from the input text)

Example Usage:

   analysis=All
   analysis=Entities,Sentiment
   analysis=Sentiment

Entities (optional)

Specifies the entities that are required to be extracted from the input text. Default is all entities. Values compatible

   Person
   Organization
   Location
   Currency
   Date
   Time
   Percent

Example:

   entities=Person
   entities=Person,Organization

inputtext (Mandatory)

The input to the diskoveror text analytics modules.

Example:

   inputtext=”This sentence is given for example. Bill Gates is a co-founder of Microsoft”

The RestAPI on being called (by passing the input text to it) with a GET request returns a structure