Text Sentiment Analysis
Enable this model configuration to analyze text sentiment based on (Lexical Emotion Analysis) is the response inside the sentiment key
Sentiment Analysis will help you interpret and quantify if the conversation or text is Positive, Very Positive, Negative, Very Negative, or Neutral. It also provides you a measure as to how subjective the conversation is with a subjectivity score.
Very Positive
a statement or sentence that is highly positive
"Brilliant work John, you really came through."
Positive
a statement or a sentence that is marginally positive
"Okay let's hope everything is fine."
Neutral
a statement or a sentence that is neutral
"sure I will do that tomorrow"
Negative
a statement or a sentence that is marginally Negative
am not happy with the outcome.."
Very Negative
a statement or sentence that is highly negative
"I don't think that will happen today"

API Request

post
https://api.marsview.ai/text/sentiment
/get_sentiment
Returns the predicted sentiment for a given sentence
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": true,
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
avgPolarity
Average Polarity score of the given content. This value ranges between -1 and 1. Where -1 is Very negative and 1 is Very positive
avgSentiment
Average predicted sentiment of the given content
avgSubjectivity
Average Subjectivity of the given content
content
A list of sentences / transcriptions for which sentiment has been predicted. This would typically only have one object for real-time analysis
phrase
The sentence for which sentiment has been predicted
polarity
Polarity score of the given content. This value ranges between -1 and 1. Where -1 is Very negative and 1 is Very positive
sentiment
Predicted sentiment of the given content based on the polarity
subjectivity
A scale of how much the sentence is based on facts and figures. A high subjectivity indicates that the information given by the speaker is not based on facts and that it is highly subjective.
sentence
The sentence for which sentiment has been predicted
Last modified 7d ago