Twitter Sentiment analyzer

Download Article as PDF

Twitter sentiment analyzer tool is a simple tool that will alow you to test sentiment of twitter users about some term. That term could be some trademark, product or any other word (or sequence of words. This is shown to be very useful for marketing agents, business inteligence agents or people who do some kind of market investigation. You may try my twitter sentiment analyzer here:

How does it works

Twitter sentiment analyzer have one input field and button. In input field you can write your term or term sequence to analyze. On enter or button press twitter sentiment analyzer will get last 100 tweets from twitter and analyze it’s sentiment. It will show you pie chart with positive and negative tweet distribution, also it will show in numbers how many tweets containing that term were positive and how many were negative. At the end it will show table with tweets, colored green if the tweets were positive, and red if they were negative. This sentiment analysis is using method described in previos post. Since it is using stemmer for English language (Porter Stemmer), and data set created from IMDB reviews on english language it could not be successfully used with other language. So I must say that at the moment it supports only English.


So as it was described in previous post sentiment analysis is guessing sentiment of tweet based on it’s statistical data that was previously inserted and on which algorithm was trained. As all machine learning algorithm, this one could also make mistakes. It should be about 80-85% accurate. But some more inaccuracy could come from wierd vocabulary and slang used on twitter. But this algorithm is able to learn it. If there are tweets that are wrongly guessed, you can press button Worng Sentiment Guess. Pressing on this button tweet will be scheduled for learning. Since many bots could press buttons, this wrong sentiment guesses has to be reviewed, before they are passed to learning algorithm. I will try to keep up, and review wrong guesses at least once a week and put it to learning algorithm.


Help make it better

It might already work good, but as LEGO moto says “Only the perfect is good enough”. So I would like to ask you to help in improving the algorithm and it database. Best help that could be given is reviewing output results, and pressing Wrong Sentiment Guess button where the sentiment guess was wrong. By the time algorithm will be better and better, understaning slang, emoticons etc.

Also if you have any ideas that could be useful for you, your work, or how to improve algorithm you may contact me or leave a comment. I would apriciate that.

Born in Bratislava, Slovakia, lived in Belgrade, Serbia, now living in Manchester, UK, and visitng the world. Nikola is a great enthusiast of AI, natural language processing, machine learning, web application security, open source, mobile and web technologies. Looking forward to create future. Nikola has done PhD in natural language processing and machine learning at the University of Manchester where he worked for 2 years. In 2020, Nikola moved to Berlin and works in Bayer Pharma R&D as a computational scientist.

Leave a Reply

Your email address will not be published. Required fields are marked *