Sentiment Analysis

What Is Sentiment Analysis?

Sentiment analysis is the process of classifying text by identifying subjectivities expressed in it. 

Examples of sentiment analysis.

Examples of sentiment analysis.

Sentiment analysis is used in almost all industries for applications such as analyzing customer surveys and social media reviews and making trading decisions using sentiment scores estimated from financial reports and news articles.

Sentiment Analysis Techniques

Building a classifier for sentiment analysis can be done using machine learning and deep learning algorithms in one of the two ways:

  • Using a prebuilt dictionary of words categorized into different sentiments
  • Using a set of prelabeled documents already classified into different sentiments

In MATLAB®, you can use built-in function calls such as vaderSentimentScores and ratioSentimentScores to perform sentiment analysis. Alternatively, you can build your own sentiment analysis classifier by using various machine learning and deep learning algorithms. In addition, you can generate a domain-specific lexicon such as for finance or biomedical applications, and then perform sentiment analysis with the trained domain-specific sentiment classifier.

Sentiment Analysis

Sentiment lexicon in word clouds generated from 10-K and 10-Q reports.

To learn more about importing, exploring, visualizing, and building models with text data including sentiment analysis, see Text Analytics Toolbox™.


Software Reference

See also: natural language processing, word2vec, n-gram, stemming, lemmatization, text mining with MATLAB, data science, deep learning, Deep Learning Toolbox™, Statistics and Machine Learning Toolbox™, recurrent neural network