![]() The first line imports the sentiment analyser and the second one creates an analyser object that we can use. VADER is very easy to use - here is how to create an analyzer: from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer analyzer = SentimentIntensityAnalyzer() So the first thing to do is to install it, for example: pip3 install vaderSentiment ![]() To quote the README file from their Github account: “VADER (Valence Aware Dictionary and sEntiment Reasoner) is a lexicon and rule-based sentiment analysis tool that is specifically attuned to sentiments expressed in social media.” And since our aim is to analyse Tweets, this seems like a good choice. The Python library that we will use is called VADER and, while it is now incorporated into NLTK, for simplicity we will use the standalone version. ![]() But, for our purposes, we are going to use a rule-based system that is particularly aimed at social media texts and can not only classify text but also embedded emoticons and shorthand such as OMG. Machine learning techniques are used by the well-known Python library NLTK (Natural Language Toolkit) and, another NLP library, Textblob, provides both types. ![]() There are two fundamental Sentiment Analysis solutions: first, there are rule-based systems that use a lexicon of words and rules to classify a particular piece of text and, second, there are systems that use machine learning techniques that analyse a set of texts that are already labelled with a particular classification (typically, positive or negative) and predict a classification of a new text based upon this. Such a large amount of data cannot be reasonably analysed individually, so what is produced electronically has to be analysed electronically. Today’s customers produce vast numbers of comments on Twitter or other social media. Gone are the days of reading individual letters sent by post. Sentiment Analysis, or Opinion Mining, is often used by marketing departments to monitor customer satisfaction with a service, product or brand when a large volume of feedback is obtained through social media.
0 Comments
Leave a Reply. |