Calling the Service

The DecarboNet indicators web service (available through this endpoint) requires the text you wish to process to be passed using one of the following three request parameters.

ParameterRequest TypeDescription
textGET or POSTPlain text to process
urlGET or POSTThe URL of a document to process
filePOSTA file to process.

Note that if a POST request is issued the data should be encoded as multipart/form-data.

Output from the Service

The response from the service is a simple JSON document containing standoff annotation markup. For example, processing the text "to cut carbon CO2 emissions if other tech doesn't mature USA might need 60 percent nuclear energy by 2050" results in the following document:

{
  "text":"to cut carbon CO2 emissions if other tech doesn't mature USA might need 60 percent nuclear energy by 2050",
  "entities":{
    "IndicatorMeasurement":[
      {
        "indices":[
          72,
          82
        ],
        "indicator":"CO2 emissions",
        "location":"USA",
        "rule":"IndicatorMeasurement",
        "original_measurement_string":"60 percent",
        "normalized_date":"01/01/2050",
        "original_date":"2050"
      }
    ]
  }
}

The document is represented as a JSON object with two properties, text holding the text of the document and entities representing the annotations. The entities property is an object mapping each "annotation type" to an array of objects, one per annotation, that holds the annotation's start and end offsets as a property indices and the other features of the annotation as its remaining properties. In this instance there is a single IndicatorMeasurement annotation type. Each annotation include a number of features which relate to the indicator, the location, measurement, and date.