Sentiment Classification with BERT Embeddings

Hands-on tutorial for sentiment classification on Amazon review dataset using pre-trained BERT Embeddings

Prakhar Mishra
Analytics Vidhya

--

Source

Sentiment Classification has been one of the oldest and most important problems in the field of Natural Language Processing (NLP). It is the task of telling if someone likes or dislikes the particular thing that they’re talking about. Getting domain specific annotated training data usually becomes a challenge, but with the help of word embeddings, we can build good sentiment classifiers even with only reasonably modest-size label training sets. There have been a plethora of pre-trained word embeddings readily available these days such as Word2Vec, GloVe, Fasttext, ConceptNet NumberBatch, etc. But, they have a problem that these are non-polysemic in nature which means that we get only one representation of a word despite of it’s occurrence in different context. In this blog, we will explore embeddings from Google’s BERT model. It’s highly unlikely that you have not heard this name as it is very popular(referred to as ImageNet moment for NLP) in machine learning community nowadays. I will still summarize it a bit for newcomers.

What is BERT?

BERT stands for (Bidirectional Encoder Representations from Transformers) is a NLP model…

--

--