Calling the Service

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

ParameterSupported RequestDescription
textGET or POSTPlain text to process
urlGET or POSTThe URL of a document to process
filePOSTA file to process.

Output from the Service

The response from the service is a simple JSON document containing standoff annotation markup. For example, processing the sentence "Polar bears hate climate change and so do we!" would produce the following output:

{
   "text":"Polar bears hate climate change and so do we!",
   "entities":{
      "SentenceSentiment":[
         {
            "indices":[
               0,
               45
            ],
            "holder":null,
            "rule2":"SentenceEntitySentiment",
            "target_string":"climate change",
            "sentiment_string":"hate",
            "emotion":"anger",
            "rule":"SentimentTerm",
            "sarcasm":"no",
            "score":-0.5,
            "polarity":"negative"
         }
      ],
      "Term":[
         {
            "indices":[
               17,
               31
            ],
            "source":"reegle",
            "rule":"Reegle",
            "label":"climate change",
            "language":"english",
            "Instance":"http://reegle.info/glossary/1018"
         }
      ]
   }
}