Text Emotion Analysis
The Emotion Analysis model will help you understand and interpret emotions in a conversation or text. It is designed to understand human conversation in the form of free text and is designed after the emotion wheel.

Emotion Types

Types of Emotions detected by enabling this model configuration in the Speech Analytics API:
Admiration Amusement Anger Annoyance Approval Caring Confusion Curiosity Desire Disappointment Disapproval Disgust Embarrassment Excitement Fear Gratitude Grief Joy Love Nervousness Optimism Pride Realization Relief Remorse Sadness Surprise Neutral

API Request

post
https://api.marsview.ai/text/emotion
/get_emotion
Returns the predicted emotion for a given sentence

Example Curl Request

Shown below is a code snippet to generate an API token
1
curl --location --request POST 'https://api.marsview.ai/cb/v1/auth/create_access_token' \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"jwtToken": "Insert JWT token Key",
5
"sentence": "Insert your sentece for emotion detection here",
6
"userId" : "[email protected]"
7
}'
Copied!

Example Response

Shown below is a sample JSON response from the above request.
1
{
2
"status": false,
3
"error" : {},
4
"data" : {
5
"text": "I love building things that change things",
6
"labels": [
7
{
8
"value": "LOVE",
9
"confidence": 0.9979714751243591
10
}
11
]
12
},
13
"userId": "[email protected]"
14
}
Copied!

Response Object

Field
Description
text
The sentence / phrase for which the emotion is predicted
labels
The emotion labels identified by the models
confidence
Confidence of the predicted emotion
value
The predicted emotion
Last modified 7d ago