A BERT Framework to Sentiment Analysis of Tweets

Sensors (Basel). 2023 Jan 2;23(1):506. doi: 10.3390/s23010506.

Abstract

Sentiment analysis has been widely used in microblogging sites such as Twitter in recent decades, where millions of users express their opinions and thoughts because of its short and simple manner of expression. Several studies reveal the state of sentiment which does not express sentiment based on the user context because of different lengths and ambiguous emotional information. Hence, this study proposes text classification with the use of bidirectional encoder representations from transformers (BERT) for natural language processing with other variants. The experimental findings demonstrate that the combination of BERT with CNN, BERT with RNN, and BERT with BiLSTM performs well in terms of accuracy rate, precision rate, recall rate, and F1-score compared to when it was used with Word2vec and when it was used with no variant.

Keywords: BERT; CNN; LSTM; deep learning; sentiment analysis; tweets.

MeSH terms

  • Electric Power Supplies*
  • Emotions
  • Humans
  • Natural Language Processing
  • Sentiment Analysis*

Grants and funding

This research received no external funding.