Sentiment Analysis Transformers

Learn about the SST and how its used by transformer for sentiment analysis.

This lesson will first explore the SST that the transformers will use to train models on sentiment analysis. We will then use Hugging Face to run a RoBERTa-large transformer.

Let’s begin by going through the SST.

The Stanford Sentiment Treebank (SST)

Socher et al. (2013) designed semantic word spaces over long phrases in the paper “Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank.”The paper can be accessed at: https://nlp.stanford.edu/~socherr/EMNLP2013_RNTN.pdf They defined principles of compositionality applied to long sequences. The principle of compositionality means that an NLP model must examine the constituent expressions of a complex sentence and the rules that combine them to understand the meaning of a sequence.

Let’s take a sample from the SST to grasp the meaning of the principle of compositionality.

Go to the interactive sentiment treebank. You can make the selections you wish. Graphs of sentiment trees will appear on the page. Click an image to obtain a sentiment tree:

Get hands-on with 1400+ tech skills courses.