Detecting Customer Emotions to Make Predictions
Sentiment analysis relies on the principle of compositionality. How can we understand a whole sentence if we cannot understand parts of a sentence? Is this tough task possible for NLP transformer models? We will try several transformer models in this chapter to find out.
We will start with the Stanford Sentiment Treebank (SST). The SST provides datasets with complex sentences to analyze. It is easy to analyze sentences such as The movie was great
. However, what happens if the task becomes very tough with complex sentences such as Although the movie was a bit too long, I really enjoyed it.?
This sentence is segmented. It forces a transformer model to understand the structure of the sequence and its logical form.
We will then test several transformer models with complex sentences and simple sentences. We will find that no matter which model we try, it will not work if it isn’t trained enough. Transformer models are like...