12
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 ...
Get Transformers for Natural Language Processing - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.