Skip to main content

Sentiment API- Analysing Texts in Real-time (Beta)


In Beta Phase

This feature is in the Beta phase. If you have any questions, ideas or suggestions please reach out to us atย devrelations@symbl.ai.

Sentiment Analysis is the interpretation of the general thought, feeling, or sense of an object or a situation.

Symbl's Sentiment API works over Speech-to-Text sentences and Topics (or aspect).

Sentiment API#

To see Sentiment API in action, you need to process a conversation using Symbl. After you process a conversation, you'll receive a conversation Id which can be passed in below-mentioned Conversation APIs. All you need to do is pass query parameters sentiment=true.

info

Each continuous sentence spoken by a speaker in conversation is referred to as a Message. Hence ,we named our Speech to Text API as Messages API. Messages API returns you a list of messages in a conversation.

๐Ÿ‘‰Messages API#

info

For topic level, the sentiment is calculated over the topic messages scope i.e. it factors in the sentiment of messages where the topic was talked about.

๐Ÿ‘‰Topics API#

API Response#

{
"messages": [
{
"id": "6412283618000896",
"text": "Best package for you is $69.99 per month.",
"from": {
"name": "Roger",
"email": "Roger@example.com"
},
"startTime": "2020-07-10T11:16:21.024Z",
"endTime": "2020-07-10T11:16:26.724Z",
"conversationId": "6749556955938816",
"phrases": [
{
"type": "action_phrase",
"text": "$69.99 per month"
}
],
"sentiment": {
"polarity": {
"score": 0.6
} ]
}

Object#

FieldDescription
polarityShows the intensity of the sentiment. It ranges from -1.0 to 1.0, where -1.0 is the most negative sentiment and 1.0 is the most positive sentiment.
suggesteddisplay suggested sentiment type (negative, neutral and positive).

suggested object#

info

We have chosen the below polarity ranges wrt sentiment type which covers a wide range of conversations. Polarity Sentiment may vary for your use case. We recommend that you define a threshold that works for you, and then adjust the threshold after testing and verifying the results.

polaritySuggested Sentiment
-1.0 => x > -0.3negative
-0.3 => x <= 0.3neutral
0.3 > x <= 1.0positive