journal article·2023-05-01Open access

Affect Analysis in Arabic Text: Further Pre-Training Language Models for Sentiment and Emotion

Wafa Alshehri, Nora Al-Twairesh, Abdulrahman Alothaim

Applied Sciences· Volume 13· Issue 9

Abstract

One of the main tasks in the field of natural language processing (NLP) is the analysis of affective states (sentiment and emotional) based on written text, and attempts have improved dramatically in recent years. However, in studies on the Arabic language, machine learning or deep learning algorithms were utilised to analyse sentiment and emotion more often than current pre-trained language models. Additionally, further pre-training the language model on specific tasks (i.e., within-task and cross-task adaptation) has not yet been investigated for Arabic in general, and for the sentiment and emotion task in particular. In this paper, we adapt a BERT-based Arabic pretrained language model for the sentiment and emotion tasks by further pre-training it on a sentiment and emotion corpus. Hence, we developed five new Arabic models: QST, QSR, QSRT, QE3, and QE6. Five sentiment and two emotion datasets spanning both small- and large-resource settings were used to evaluate the developed models. The adaptation approaches significantly enhanced the performance of seven Arabic sentiment and emotion datasets. The developed models showed excellent improvements over the sentiment and emotion datasets, which ranged from 0.15–4.71%.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Sentiment Analysis and Opinion Mining · Topic Modeling · Mental Health via Writing

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

STC’s Artificial Intelligence Chair, College of Computer and Information Sciences, King Saud University, Riyadh 11451, Saudi Arabia

Department of Information Systems, College of Computer and Information Sciences, King Saud University, Riyadh 11451, Saudi Arabia

Department of Computer Sciences, College of Science and Arts, King Khalid University, Almajarda 63931, Saudi Arabia

Department of Information Technology, College of Computer and Information Sciences, King Saud University, Riyadh 11451, Saudi Arabia

Funding

Deanship of Scientific Research, King Saud University

References (82)

Show source-provided references
1. Mikolov, T., Chen, K., Corrado, G., and Dean, J. (2013). Efficient estimation of word representations in vector space. arXiv.
2. Pennington, J., Socher, R., and Manning, C.D. (2014, January 25–29). Glove: Global vectors for word representation. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar.10.3115/v1/D14-1162 ↗
3. Enriching word vectors with subword information10.1162/tacl_a_00051 ↗
4. Torrey, L., and Shavlik, J. (2010). Handbook of Research on Machine Learning Applications and Trends: Algorithms, Methods, and Techniques, IGI Global.10.4018/978-1-60566-766-9.ch011 ↗
5. A review of sentiment analysis research in Arabic language10.1016/j.future.2020.05.034 ↗
6. Abdullah, M., Hadzikadicy, M., and Shaikhz, S. (2018, January 17–20). SEDAT: Sentiment and emotion detection in Arabic text using CNN-LSTM deep learning. Proceedings of the 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA), Orlando, FL, USA.10.1109/ICMLA.2018.00134 ↗
7. Stevenson, A. (2010). Oxford Dictionary of English, Oxford University Press.
8. Universals and cultural differences in the judgments of facial expressions of emotion10.1037/0022-3514.53.4.712 ↗
9. Plutchik, R. (1980). Theories of Emotion, Elsevier.
10. BioBERT: A pre-trained biomedical language representation model for biomedical text mining10.1093/bioinformatics/btz682 ↗
11. Alsentzer, E., Murphy, J., Boag, W., Weng, W.-H., Jindi, D., Naumann, T., and McDermott, M. (2019, January 5). Publicly Available Clinical BERT Embeddings. Proceedings of the 2nd Clinical Natural Language Processing Workshop, Minneapolis, MN, USA.10.18653/v1/W19-1909 ↗
12. Araci, D. (2019). FinBERT: Financial Sentiment Analysis with Pre-trained Language Models. arXiv.
13. Gururangan, S., Marasović, A., Swayamdipta, S., Lo, K., Beltagy, I., Downey, D., and Smith, N.A. (2020, January 5–10). Don’t Stop Pretraining: Adapt Language Models to Domains and Tasks. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online.10.18653/v1/2020.acl-main.740 ↗
14. Sun, C., Qiu, X., Xu, Y., and Huang, X. (2019). China National Conference on Chinese Computational Linguistics, Springer.
15. AraCOVID19-MFH: Arabic COVID-19 Multi-label Fake News & Hate Speech Detection Dataset10.1016/j.procs.2021.05.086 ↗
16. Lan, W., Chen, Y., Xu, W., and Ritter, A. (2020, January 19–20). An Empirical Study of Pre-trained Transformers for Arabic Information Extraction. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), Online.10.18653/v1/2020.emnlp-main.382 ↗
17. Abdelali, A., Hassan, S., Mubarak, H., Darwish, K., and Samih, Y. (2021). Pre-training bert on arabic tweets: Practical considerations. arXiv.
18. Kenton, J.D.M.-W.C., and Toutanova, L.K. (2019, January 2–7). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. Proceedings of the NAACL-HLT, Minneapolis, MN, USA.
19. Dadas, S., Perełkiewicz, M., and Poświata, R. (2020, January 12–14). Pre-training polish transformer-based language models at scale. Proceedings of the Artificial Intelligence and Soft Computing: 19th International Conference, ICAISC 2020, Zakopane, Poland. Part II 19.10.1007/978-3-030-61534-5_27 ↗
20. Polignano, M., Basile, P., de Gemmis, M., Semeraro, G., and Basile, V. (2019, January 13–15). AlBERTo: Italian BERT Language Understanding Model for NLP Challenging Tasks Based on Tweets. Proceedings of the CLiC-it, Bari, Italy.
21. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., and Polosukhin, I. (2017, January 4–9). Attention is all you need. Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA.
22. Antoun, W., Baly, F., and Hajj, H. (2020, January 11–16). AraBERT: Transformer-based Model for Arabic Language Understanding. Proceedings of the LREC 2020 Workshop Language Resources and Evaluation Conference, Marseille, France.
23. ElJundi, O., Antoun, W., El Droubi, N., Hajj, H., El-Hajj, W., and Shaban, K. (2019, January 1). hulmona: The universal language model in arabic. Proceedings of the Fourth Arabic Natural Language Processing Workshop, Florence, Italy.10.18653/v1/W19-4608 ↗
24. Obied, Z., Solyman, A., Ullah, A., Fat’hAlalim, A., and Alsayed, A. (March, January 26). BERT Multilingual and Capsule Network for Arabic Sentiment Analysis. Proceedings of the 2020 International Conference On Computer, Control, Electrical, And Electronics Engineering (ICCCEEE), Khartoum, Sudan.
25. Wadhawan, A. (2021, January 19). AraBERT and Farasa Segmentation Based Approach For Sarcasm and Sentiment Detection in Arabic Tweets. Proceedings of the Sixth Arabic Natural Language Processing Workshop, Kyiv, Ukraine.
26. Antoun, W., Baly, F., and Hajj, H. (2021, January 19). AraELECTRA: Pre-Training Text Discriminators for Arabic Language Understanding. Proceedings of the Sixth Arabic Natural Language Processing Workshop, Kyiv, Ukraine.
27. Abdul-Mageed, M., and Elmadany, A. (2021, January 1–6). ARBERT & MARBERT: Deep Bidirectional Transformers for Arabic. Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), Online.10.18653/v1/2021.acl-long.551 ↗
28. Conneau, A., Khandelwal, K., Goyal, N., Chaudhary, V., Wenzek, G., Guzmán, F., Grave, É., Ott, M., Zettlemoyer, L., and Stoyanov, V. (2020, January 5–10). Unsupervised Cross-lingual Representation Learning at Scale. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online.10.18653/v1/2020.acl-main.747 ↗
29. Inoue, G., Alhafni, B., Baimukan, N., Bouamor, H., and Habash, N. (2021, January 19). The interplay of variant, size, and task type in Arabic pre-trained language models. Proceedings of the Sixth Arabic Natural Language Processing Workshop, Kyiv, Ukraine.
30. Abdaoui, A., Berrimi, M., Oussalah, M., and Moussaoui, A. (2021). Dziribert: A pre-trained language model for the algerian dialect. arXiv.
31. AraXLNet: Pre-trained language model for sentiment analysis of Arabic10.1186/s40537-022-00625-z ↗
32. Safaya, A., Abdullatif, M., and Yuret, D. (2020, January 12–13). Kuisail at semeval-2020 task 12: Bert-cnn for offensive speech identification in social media. Proceedings of the Fourteenth Workshop on Semantic Evaluation, Barcelona, Spain.10.18653/v1/2020.semeval-1.271 ↗
33. Elmadany, A., Nagoudi, E.M.B., and Abdul-Mageed, M. (2022). ORCA: A Challenging Benchmark for Arabic Language Understanding. arXiv.
34. Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., and Stoyanov, V. (2019). Roberta: A robustly optimized bert pretraining approach. arXiv.
35. Khaddaj, A., Hajj, H., and El-Hajj, W. (2019, January 1). Improved generalization of arabic text classifiers. Proceedings of the Fourth Arabic Natural Language Processing Workshop, Florence, Italy.10.18653/v1/W19-4618 ↗
36. El Mekki, A., El Mahdaouy, A., Berrada, I., and Khoumsi, A. (2021, January 6–11). Domain adaptation for Arabic cross-domain and cross-dialect sentiment analysis from contextualized word embedding. Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Online.10.18653/v1/2021.naacl-main.226 ↗
37. Alqahtani, Y., Al-Twairesh, N., and Alsanad, A. (2023). A Comparative Study of Effective Domain Adaptation Approaches for Arabic Sentiment Classification. Appl. Sci., 13.10.3390/app13031387 ↗
38. Badaro, G., Jundi, H., Hajj, H., El-Hajj, W., and Habash, N. (2018, January 8). Arsel: A large scale arabic sentiment and emotion lexicon. Proceedings of the OSACT 3: The 3rd Workshop on Open-Source Arabic Corpora and Processing Tools, Miyazaki, Japan.
39. Mohammad, S., Bravo-Marquez, F., Salameh, M., and Kiritchenko, S. (2018, January 5–6). Semeval-2018 task 1: Affect in tweets. Proceedings of the 12th International Workshop on Semantic Evaluation, New Orleans, LA, USA.10.18653/v1/S18-1001 ↗
40. Badaro, G., El Jundi, O., Khaddaj, A., Maarouf, A., Kain, R., Hajj, H., and El-Hajj, W. (2018, January 5–6). Ema at semeval-2018 task 1: Emotion mining for arabic. Proceedings of the 12th International Workshop on Semantic Evaluation, New Orleans, LA, USA.10.18653/v1/S18-1036 ↗
41. Emotion Detection in Arabic Text Using Machine Learning Methods
42. Deep learning for emotion analysis in Arabic tweets10.1186/s40537-021-00523-w ↗
43. Abdul-Mageed, M., Zhang, C., and Hashemi, A. (2020, January 12). AraNet: A Deep Learning Toolkit for Arabic Social Media. Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Offensive Language Detection, Marseille, France.
44. Combining context-aware embeddings and an attentional deep learning model for Arabic affect analysis on twitter10.1109/ACCESS.2021.3102087 ↗
45. An ensemble deep learning approach for emotion detection in arabic tweets
46. Al-Twairesh, N. (2021). The evolution of language models applied to emotion analysis of Arabic tweets. Information, 12.10.3390/info12020084 ↗
47. Aravec: A set of arabic word embedding models for use in arabic nlp10.1016/j.procs.2017.10.117 ↗
48. Talafha, B., Ali, M., Za’ter, M.E., Seelawi, H., Tuffaha, I., Samir, M., Farhan, W., and Al-Natsheh, H. (2020, January 12). Multi-dialect Arabic BERT for Country-level Dialect Identification. Proceedings of the Fifth Arabic Natural Language Processing Workshop, Barcelona, Spain.
49. Mahmoud, A.E.-S., Lazem, S., and Abougabal, M. (2022). Benchmarking a Large Twitter Dataset for Arabic Emotion Analysis, Research Square.10.21203/rs.3.rs-2005495/v1 ↗
50. Abdelali, A., Darwish, K., Durrani, N., and Mubarak, H. (2016, January 12–17). Farasa: A fast and furious segmenter for arabic. Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Demonstrations, San Diego, CA, USA.10.18653/v1/N16-3003 ↗
51. Parker, R., Graff, D., Chen, K., Kong, J., and Maeda, K. (2022, March 01). “Arabic Gigaword.” LDC Catalog No. LDC2009T30. Available online: https://catalog.ldc.upenn.edu/LDC2009T30.
52. El-Khair, I.A. (2016). 1.5 billion words arabic corpus. arXiv.
53. Lison, P., and Tiedemann, J. (2016, January 23–28). Opensubtitles2016: Extracting large parallel corpora from movie and tv subtitles. Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC 2016), Portorož, Slovenia.
54. Sennrich, R., Haddow, B., and Birch, A. (2016, January 7–12). Neural Machine Translation of Rare Words with Subword Units. Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Berlin, Germany.10.18653/v1/P16-1162 ↗
55. Alomari, K.M., ElSherif, H.M., and Shaalan, K. (2017). International Conference on Industrial, Engineering and Other Applications of Applied Intelligent Systems, Springer.
56. Arsas: An arabic speech-act and sentiment corpus of tweets
57. Baly, R., Khaddaj, A., Hajj, H., El-Hajj, W., and Shaban, K.B. (2018, January 8). ArSentD-LEV: A Multi-Topic Corpus for Target-based Sentiment Analysis in Arabic Levantine Tweets. Proceedings of the OSACT 3: The 3rd Workshop on Open-Source Arabic Corpora and Processing Tools, Miyazaki, Japan.
58. Boujou, E., Chataoui, H., El Mekki, A., Benjelloun, S., Chairi, I., and Berrada, I. (2021). An open access NLP dataset for Arabic dialects: Data collection, labeling, and model construction. arXiv.
59. Salameh, M., Mohammad, S., and Kiritchenko, S. (June, January 31). Sentiment after translation: A case-study on arabic social media posts. Proceedings of the 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Denver, CO, USA.10.3115/v1/N15-1078 ↗
60. Kwaik, K.A., Chatzikyriakidis, S., Dobnik, S., Saad, M., and Johansson, R. (2020, January 12). An Arabic tweets sentiment analysis dataset (ATSAD) using distant supervision and self training. Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Offensive Language Detection, Marseille, France.
61. Nabil, M., Aly, M., and Atiya, A. (2015, January 17–21). Astd: Arabic sentiment tweets dataset. Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, Lisbon, Portugal.10.18653/v1/D15-1299 ↗
62. Rosenthal, S., Farra, N., and Nakov, P. (2017, January 3–4). SemEval-2017 task 4: Sentiment analysis in Twitter. Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), Vancouver, BC, Canada.10.18653/v1/S17-2088 ↗
63. Farha, I.A., and Magdy, W. (2020, January 12). From arabic sentiment analysis to sarcasm detection: The arsarcasm dataset. Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Offensive Language Detection, Marseille, France.
64. Using tweets and emojis to build tead: An Arabic dataset for sentiment analysis
65. MARSA: Multi-domain Arabic resources for sentiment analysis10.1109/ACCESS.2021.3120746 ↗
66. Arasenti-tweet: A corpus for arabic sentiment analysis of saudi tweets10.1016/j.procs.2017.10.094 ↗
67. Al Omari, M., Al-Hajj, M., Hammami, N., and Sabra, A. (2019, January 3–4). Sentiment classifier: Logistic regression for arabic services’ reviews in lebanon. Proceedings of the 2019 International Conference on Computer and Information Sciences (ICCIS), Sakaka, Saudi Arabia.10.1109/ICCISci.2019.8716394 ↗
68. Aly, M., and Atiya, A. (2013, January 22–27). Labr: A large scale arabic book reviews dataset. Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), Sofia, Bulgaria.
69. Elnagar, A., Khalifa, Y.S., and Einea, A. (2018). Intelligent Natural Language Processing: Trends and Applications, Springer.
70. An annotated huge dataset for standard and colloquial arabic reviews for subjective sentiment analysis10.1016/j.procs.2018.10.474 ↗
71. Al-Khatib, A., and El-Beltagy, S.R. (2017). International Conference on Computational Linguistics and Intelligent Text Processing, Springer.
72. Alhuzali, H., Abdul-Mageed, M., and Ungar, L. (2018, January 6). Enabling Deep Learning of Emotion With First-Person Seed Expressions. Proceedings of the Second Workshop on Computational Modeling of People’s Opinions, Personality, and Emotions in Social Media, New Orleans, LA, USA.10.18653/v1/W18-1104 ↗
73. Alqahtani, G. (2022). Multimodal Emotion Detection of Social Networks Data Using Deep Learning. [Master’s Thesis, University of Patras].
74. Beltagy, I., Lo, K., and Cohan, A. (2019). SciBERT: A pretrained language model for scientific text. arXiv.10.18653/v1/D19-1371 ↗
75. Application of Support Vector Machine for Arabic Sentiment Classification Using Twitter-Based Dataset
76. Deep learning approaches for Arabic sentiment analysis10.1007/s13278-019-0596-4 ↗
77. Abdulla, N.A., Ahmed, N.A., Shehab, M.A., and Al-Ayyoub, M. (2013, January 3–5). Arabic sentiment analysis: Lexicon-based and corpus-based. Proceedings of the 2013 IEEE Jordan Conference on Applied Electrical Engineering and Computing Technologies (AEECT), Amman, Jordan.10.1109/AEECT.2013.6716448 ↗
78. ElSahar, H., and El-Beltagy, S.R. (2015). International Conference on Intelligent Text Processing and Computational Linguistics, Springer.
79. Arabic senti-lexicon: Constructing publicly available language resources for Arabic sentiment analysis10.1177/0165551516683908 ↗
80. Hussien, W.A., Tashtoush, Y.M., Al-Ayyoub, M., and Al-Kabi, M.N. (2016, January 13–14). Are emoticons good enough to train emotion classifiers of arabic tweets?. Proceedings of the 2016 7th International Conference on Computer Science and Information Technology (CSIT), Amman, Jordan.10.1109/CSIT.2016.7549459 ↗
81. Sarbazi-Azad, S., Akbari, A., and Khazeni, M. (2021, January 28–29). ExaAEC: A New Multi-label Emotion Classification Corpus in Arabic Tweets. Proceedings of the 2021 11th International Conference on Computer Engineering and Knowledge (ICCKE), Mashhad, Iran.10.1109/ICCKE54056.2021.9721493 ↗
82. Liaw, R., Liang, E., Nishihara, R., Moritz, P., Gonzalez, J.E., and Stoica, I. (2018). Tune: A research platform for distributed model selection and training. arXiv.