Our Sentiment Analysis API demo is a good place to try out our API’s ability to find the tone of a sentence or paragraph. This API can be useful if you have a large amount of user responses or reviews and you want to quickly find the negative comments to see what your customers don’t like and vice versa.
However, our API gives you more power than that. Besides just reading the type response (“negative”, ”neutral”, or ”positive”), you can actually determine for yourself what you consider positive or negative. Below we will explain two useful information, score and ratio, that our API returns for each text analyzed.
The score indicates how negative or positive the overall text analyzed is. Anything below a score of -0.05 we tag as negative and anything above 0.05 we tag as positive. Anything in between inclusively, we tag as neutral.
Since we have provided the actual scores we used to determine the type, you are free to reject our interpretation and interpret the actual scores yourself and create your own negative and positive minimum scores.
The ratio is the combined total score of negative words compared to the combined total score of positive words, ranging from -1 to 1. It. Take the below for example.
Let’s say we are analyzing words A, B, C and D.
Ultimately, the score and ratio allows you to go beyond what we think is negative or what we think is positive. In your code, you can consider the impact of the score or the impact of the ratio, or even combine them all to set your own positive and negative thresholds to suit your application.
Maybe your users are generally very negative? You can, for example, instead of using our interpretation that less than -0.05 is negative and more than 0.05 is positive, you can write your own algorithm that says below -0.9 is negative and above -0.8 is positive.
Take a look at our Sentiment Analysis API Demo and try it out yourself.
The possibilities are endless, but you can use our API to build your own sentiment analysis app, or to analyze your social media comments.
Learn how to build your own sentiment analysis app, or check out this tutorial on how to analyze twitter feeds with our sentiment analysis API.
I am currently testing twitter sentiment analysis and I noticed that all the tweets that start with @username are not considered(discarded). Please advise.
Unfortunately, we do not provide out-of-box API. It means we do not discard @username since we cannot assume API consumer’s environment. For example, some API consumers might want to utilize @username.
Instead, how about excluding @username from the input? You might want to get useful code at https://stackoverflow.com/questions/5188792/how-to-check-a-string-for-specific-characters
I don’t understand the score. It seems in some cases, it is an average of the scores of each word. But in other cases it is not. How is the total score calculated as a function of the scores of each word?
Thank you for the well interpreted article. I am now looking forward to check more essential entries dedicated to this problem!
Eνery weekend I used to visit this web site, for the reason that і wіsh for enjoyment, since
thіs these web page conations truly nice funny material tοo.
Hi. I’m currently doing my research study about AlchemyAPI and your post really help me in getting the idea of how AlchemyAPI works. it would be a great help if you can explain how exactly the system calculate the score? is there any algorithm behind it?