Sentiment

Get sentiment

Fetch sentiment scores for a given request ID


GET /sentiment/{sentiment_request_id}

Response

{
	"doc_id": 12345,
	"sentiment": {
		"avg_sentiment": 0.4223407638888889,
		"median_sentiment": 0.4251729166666667,
        "adj_sentiment": 0.48273465950023029,
		"median_adj_sentiment": 0.46384950202764,
		"by_paragraph": [
			{
				"content": {
					"length": 386,
					"offset": 573,
					"paragraph": 1
				},
				"overall_score": 0.4144333333333333,
				"by_sentence": [
					{
						"end": 155,
						"idx": 0,
						"start": 0,
						"sentiment": 0.4588
					},
					{
						"end": 249,
						"idx": 1,
						"start": 156,
						"sentiment": 0.7845
					},
					{
						"end": 386,
						"idx": 2,
						"start": 250,
						"sentiment": 0
					}
				]
			}, ...
		]
	},
	"created": "2023-01-28T15:38:54",
	"modified": "2023-01-28T15:39:44"
}

Code Samples

Bash

curl --request GET \
  --url 'https://premium.aiera.com/api/nlu-v1/sentiment/{sentiment_request_id}' \
  --header 'X-API-Key: xxx'

Python

import requests
requests.request(
    "GET", 
    "https://premium.aiera.com/api/nlu-v1/sentiment/{sentiment_request_id}", 
    headers={"X-API-Key": "xxx"}
)
Previous
Create Sentiment