Do you have any questions? Just write us an email or ask us through the feedback section.

Response

The output contains information about the status of the request and it divides the text into fragments indicating the reputation associated to the different relevant entities (in this case, organizations and people) detected in each fragment. To do that, it will indicate in which category (or categories) or dimmension/s the fragment is classified according a reputation model for business — that is, which categories affect the reputation of the set of detected entities — and the sentiment associated to each entity in those categories. Information about irony and subjectivity is obtained too.

The information provided is the same for the different output formats and the naming convention used for all fields is lowercase_separated_by_underscore.

Response output

These are the fields included in the response document.

Name Description
status

Contains information about the extraction process and whether it has finished successfully. It is formed by a status code (code), a natural number that identifies the result, and a message (msg), a string describing the result. In addition, the field (credits) contains a natural number that indicates the credits consumed in the request and (remaining_credits) shows the number of credits left to the user to get to the credit limit.

You can find all the possible status codes returned by the API with an explanation and tips on how to manage them in our error codes catalog.

A request is any HTTP request done to the API to analyze less than 500 words. If the text sent is longer than that, then it will be considered that more than a request is made, more specifically, as many requests as we would need if the text were divided in chunks of 500 words.

For instance, an HTTP request with 1013 words, will count as three requests, so 3 credits will be consumed; an HTTP request with a text 25648 words long would count as 25648/500 = 51.296 => 52 credits, and so on.

Did you know...?

Only the successful requests to the API will consume credits. In other words, the credits specified in the answer will only count as credits consumed when code=0.

fragment_list

List of fragments in which the text is divided. Each fragment is represented by an element fragment.

category_list

List of categories in which the input text is classified. Each category contains the a field category, with its main form.

entity_list

List of entities of type organization or person, identified in the text. Each one will be represented by an element entity, which will contain the following fields:

  • entity: main form of the entity.
  • type: type classification hierarchy of the entity.

Fragment element

These are the fields included in each fragment element.

Name Description
inip

Initial position of the fragment, starting from 0.

endp

End position of the fragment.

info_list

Detailed information from the fragment listed by entity and category. Each piece of information contains the following fields:

  • entity: main form of the entity.
  • type: type classification hierarchy of the entity.
  • category: main form of the category in which the input text is classified.
  • relevance: relative relevance value of the category, represented by a number in the 0-100% range, and computed with respect to the top ranked result.
  • sentiment: This value will provide the sentiment analysis associated to the entity in the category. If no entities are found, this value will represent the sentiment in that fragment. If no categories are found, this value will represent the sentiment regardless of the category.

    Possible values for this field are the following tags:

    • P+: strong positive
    • P: positive
    • NEU: neutral
    • N: negative
    • N+: strong negative
    • NONE: no sentiment found
  • subjectivity: this field marks the subjectivity of the fragment it refers to. It has two possible values:
    • OBJECTIVE: the text does not have any subjectivity marks
    • SUBJECTIVE: the text has subjective marks
  • irony: this field indicates the irony of the fragment it refers to. It has two possible values:
    • NONIRONIC: the text does not have ironic marks
    • SUBJECTIVE: the text has ironic marks

Response examples

The format in which this information will be shown will depend on the value of the of parameter.

    Apple lanza el 'mayor adelanto' en la historia del iPhone: http://bit.ly/1tHYVgY
{
  "status": {
      "code": "0",
      "msg": "OK",
      "credits": "0"
  },
  "fragment_list":[
    {
      "text": "Apple lanza el 'mayor adelanto' en la historia del iPhone: http://bit.ly/1tHYVgY",
      "inip": "0",
      "endp": "79",
      "info_list": [
        {
          "entity": "Apple",
          "type": "Top>Organization>Company>TechnologyCompany",
          "category": "Innovación y flexibilidad - Innovación",
          "relevance": "100",
          "sentiment": "P+",
          "subjectivity": "OBJECTIVE",
          "irony": "NONIRONIC"
        }
      ]
    }
  ],
  "category_list":[
    {
      "category": "Innovación y flexibilidad - Innovación"
    }
  ],
  "entity_list":[
    {
      "entity": "Apple",
      "type": "Top>Organization>Company>TechnologyCompany"
    }
  ]
}