This recipe will compare two machine learning approaches to see which is more likely to give an accurate analysis of sentiment. Both approaches analyse a corpora of positive and negative Movie Review data by training and thereafter testing to get an accuracy score. The techniques are Support Vector Machines (SVM) and Naive Bayes.
In this recipe we use 3 ebooks to show how topic analysis can identify the different topics each text represents. We will use Latent Dirichlet Allocation (LDA) approach which is the most common modelling method to discover topics. We can then spice it up with an interactive visualization of the discovered themes. This recipe is based on Zhang Jinman's notebook found on TAPoR.
NB: Any number of texts can be used, we choose 3 for this recipe.
This recipe shows how to conduct dictionary-based sentiment analysis on a collection of passages, such as tweets or reviews. It uses pre-existing dictionaries of positive and negative words, and loads a text file of passages to analyze.
This recipe shows how to analyze the sentiment of a simple passage of text, such as a tweet.
This is a recipe for analyzing the mood or opinion of a text or corpus.