Using the Bert model and the attention mechanism to obtain an accurate sentiment analysis model

Authors

  • Jianxiang Ma

DOI:

https://doi.org/10.54097/vx0cr825

Keywords:

Bert model, Attention mechanism, Negative adverb weight, Accuracy vs. Epochs, Precision vs. Epochs, Recall vs. Epochs, F1-score vs. Epochs

Abstract

This study takes the network reviews captured by Ctrip as the object of investigation. 29,025 reviews are preprocessed first, and the training set, verification set and test set are divided according to proportion. The Bert model is used for training and data parameters are retained. Only the subject and affective adverbs were retained and the negative adverbs were artificially weighted. The data set was retrained. The research results supplemented the innovation and application value of the training results, and could prove whether there were commercial malicious competition and other phenomena in bad reviews in network evaluations.

References

[1] PEISW,WANGLL. Text sentiment analysis based on attention mechanism[J]Computer Engineering and Science, 2019, 41 (2):343-353.

[2] ASGHAR M Z, KUNDI F M, AHMAD S, et al. T-SAF:Twitter senti· 46 · Issue 2 ment analysis framework using a hybrid classification scheme[J]. Ex⁃ pert Systems, 2018, 35 (1):e12233.

[3] AFZAAL M, USMAN M, FONG A C M, et al. Multiaspect-based opinion c lassification model for tourist reviews[J]. Expert Systems, 2019, 36 (2):1-24.

[4] TAO Y G. Social media data-based sentiment analysis of tourists’air quality perceptions[J]. Sustainability, 2019, 11 (18)1-23.

[5] LIU Y, HUANG K X, BAO J G, et al. Listen to the voices from home:an analysis of chinese tourists′ sentiments regarding Austra⁃ lian destinations[J].Tourism Management, 2019, 71:337-347.

[6] LI W J, QI F, TANG M, et al. Bidirectional LSTM with self-atten⁃ tion mechanism and multi-channel features for sentimentclassifica⁃ tion[J]. Neurocomputing, 2020, 387:63-77.

[7] HAO J X, FU Y, HSU C H, et al. Introducing news media sentiment analytics to residents’attitudes research[J]. Journal of Travel Re⁃ search, 2020, 59 (8):1353-1369.

[8] MUHAMAD S A, MUHAMMAD Z N, USADA E. Pengaruh seman⁃ tic expansion pada naïve Bayes classifier untuk analisis sentimen to⁃ koh masyarakat[J]. Journal RESTI (Rekayasa Sistem dan Teknologi Informasi), 2019, 3 (2):141-147.

[9] GUAN P F, LI B A, LYU X Q, et al. Attention enhanced bi-direc⁃ tional LSTM for sentiment analysis[J]. Journal of Chinese Informa⁃ tion Processing, 2019, 33 (2):105-111. Guan Pengfei, Li Baoan, Lv Xueqiang, et al. Attention-enhanced bidirection al LSTM sentiment analysis [J]. Chinese Journal of Information, 2019,33(2): 1 05-111.

[10] KIM Y. Convolutional neural networks for sentence classification [C]//Doha:Proceedings of the 2014 Conference on Empirical Meth⁃ ods in Natural Language Processing (EMNLP), 2014.

Downloads

Published

26-12-2024

Issue

Section

Articles

How to Cite

Ma, J. (2024). Using the Bert model and the attention mechanism to obtain an accurate sentiment analysis model. Journal of Computing and Electronic Information Management, 15(3), 37-41. https://doi.org/10.54097/vx0cr825