Sentiment analysis
Step 1: Analyze text
curl -X POST "https://api.sherpa.ai/v2/sentiment-analysis/polarities" \
-H "X-API-Key: XXXX-PUBLIC-API-KEY-XXXX" \
-H "Content-Type: application/json" \
-d "{\"text\":\"With alarming milestones continuing to accumulate across the United States, hospitals are increasingly overtaxed and overwhelmed. Health-care workers are once again facing shortages of masks, gloves and other protective equipment, and intensive care units in many hard-hit areas are approaching capacity.\",\"type\":\"mean\"}"
{
"document": {
"polarity": -0.43129998,
"valence": 0.21724999,
"arousal": 0.245,
"sentences": [
{
"text": "With alarming milestones continuing to accumulate across the United States , hospitals are increasingly overtaxed and overwhelmed .",
"polarity": -0.3653,
"valence": -0.1779,
"arousal": 0.4185
},
{
"text": "Health - care workers are once again facing shortages of masks , gloves and other protective equipment , and intensive care units in many hard - hit areas are approaching capacity .",
"polarity": -0.4973,
"valence": 0.6124,
"arousal": 0.0715
}
]
}
}