Sentiment AnalysisAdmin Scope
Zia Sentiment Analysis is a part of Text Analytics that processes textual content to recognize the tone of the message, and the sentiments conveyed through it. It analyses each sentence in the text to determine if its tone is positive, negative, or neutral. It then determines the tone of the overall text as one of these three sentiments, based on the sentiments recognized in each sentence.
You can pass a block of text as the input of up to 1500 characters in a single request. The input text is passed to getSentimentAnalysis().
You can also pass optional keywords for the text. This will enable Sentiment Analysis to process only those sentences that contain these keywords, and determine their sentiments. Other sentences will be ignored.
The zia reference used in the code snippets below is the component instance created to perform these operations. The promise returned here is resolved to a JSON object.
const result = await zia.getSentimentAnalysis([
'Zoho Corporation, is an Indian multinational technology company that makes web-based business tools. It is best known for Zoho Office Suite. The company was founded by Sridhar Vembu and Tony Thomas and has a presence in seven locations with its global headquarters in Chennai, India, and corporate headquarters in Pleasanton, California.'
], ['Zoho']); //Pass the text and the optional keyword to process
console.log(result);
Example of Expected Reponse
A sample response that you will receive is shown below. The response also returns the confidence scores for the sentiments detected in each sentence, to showcase the accuracy of the analysis. The confidence score lies in the range of 0 to 1. A confidence score for the overall analysis is also returned.
{
"sentiment_prediction": [
{
"document_sentiment": "Neutral",
"sentence_analytics": [
{
"sentence": "Zoho Corporation, is an Indian multinational technology company that makes web-based business tools.",
"sentiment": "Neutral",
"confidence_scores": {
"negative": 0,
"neutral": 1,
"positive": 0
}
},
{
"sentence": "It is best known for Zoho Office Suite.",
"sentiment": "Neutral",
"confidence_scores": {
"negative": 0,
"neutral": 0.6,
"positive": 0.4
}
},
{
"sentence": "The company was founded by Sridhar Vembu and Tony Thomas and has a presence in seven locations with its global headquarters in Chennai, India, and corporate headquarters in Pleasanton, California.",
"sentiment": "Neutral",
"confidence_scores": {
"negative": 0,
"neutral": 0.88,
"positive": 0.12
}
}
],
"overall_score": 0.83
}
]
}
Last Updated 2026-07-02 14:51:41 +0530 IST
Yes
No
Send your feedback to us