Sentiment Analysis

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 analyzes 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 the these three sentiments, based on the sentiments recognized in each sentence.

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.

You can pass a block of text as the input of upto 1500 characters in a single request. The input text is passed to get_sentiment_analysis().

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 below is already defined in the component instance page.

    
copy
result = zia.get_sentiment_analysis(['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'])

A sample response is shown below :

    
copy
"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 } }, ], "overall_score": 0.83 } ]

Last Updated 2023-12-18 16:20:08 +0530 +0530

ON THIS PAGE