Skip to content

Emotion Detector

Emotion is one of the things that can be analyzed in a text. Identifying an emotion can be done by using Emotion Detector module. This module will identify four types of emotions: joy, sadness, anger, and fear.

The Emotion Detector module can be used by entering text input, either it’s a form of sentence or paragraph. Then, the module will generate an emotion type from that text and its confidence score.

Illustration

Emotion Detector

Request Method

POST

Request URL

1
https://api.prosa.ai/v2/text/emotion

Request Header

Key Data Type Description Value
Content-Type string Media type of the body sent to the API. Only Support 'application/json' application/json
x-api-key string API Key Acquired from Prosa API Console [YOUR_API_KEY]

Request Body

The request body accepts the following parameter(s) in JSON format.

Parameter Data Type Description Auto Required
text string text to be processed True

Example

Sample Request Body One Sentences (JSON)

1
2
3
{
  "text": "Sertifikat siap nikah  Taik anjing.. makan tuh sertifikat goblog. Aturan paling sial."
}

Sample Response Body One Sentences (JSON)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{
    "emotion": [
        {
            "sentences": "Sertifikat siap nikah  Taik anjing.. makan tuh sertifikat goblog. Aturan paling sial.",
            "emotion": [
                [
                    "Anger",
                    0.91800195
                ]
            ]
        }
    ]
}

Free trial

Are you interested in our API? Click the button below and get your free trial now.

try now

Version History

Below is the version history of our Emotion Detector API.

Version Accuracy Test Data
1.0 82.1% 5,293 sentences

Questions?

We do our best to make this documentation clear and user friendly, but if you have unanswered questions, please send email to support@prosa.ai.