Document Type : Research Paper
Authors
1 PhD Candidate, Department of Information Technology Management, Qeshm Branch, Islamic Azad University, Qeshm, Iran
2 Department of Industrial Management, Central Tehran Branch, Islamic Azad University, Tehran, Iran
3 Department of Mathematics, Islamic Azad University, Qeshm Branch, Qeshm, Iran
Abstract
This study introduces EmoBERTScr, an intelligent Multilingual BERT-based model for detecting and analyzing emotional and behavioral patterns in Persian and multilingual screenplays. A dataset of 35,800 dialogue samples from 1,700 Persian and English screenplays was manually collected and annotated by linguistics and psychology experts into eight emotional categories according to Plutchik’s (1980) wheel of emotions. The methodology involved data acquisition from cinematic archives, preprocessing (noise removal, normalization, and tokenization), and supervised learning with a fine-tuned Multilingual BERT architecture. The model achieved an overall accuracy of 98.22%, with F1-scores ranging from 95.53% (surprise) to 100% (joy, fear, sadness, trust) across all emotional categories. The primary contribution of this research lies in developing a practical AI assistant for screenwriters, capable of providing real-time feedback to enhance narrative coherence and maintain emotional consistency, which can reduce rewriting and production costs in the film industry. While certain overlapping emotional states, such as anticipation and surprise, remain challenging to distinguish, the proposed approach demonstrates robust performance in both dominant and subtle emotional expressions. This work establishes a foundation for future advancements in intelligent narrative analysis, particularly for low-resource languages like Persian, and highlights the potential for integrating AI-driven emotion recognition into professional screenplay development workflows.
Keywords
- Multilingual BERT
- EmoBERTScr
- Emotion Recognition
- Intelligent Assistant
- Character Behavior
- Persian Screenplays
- Plutchik’s Emotion Wheel
- Narrative Coherence
Main Subjects
- Bordwell, D., & Thompson, K. (2016). Film art: An introduction (10th ed.). McGraw-Hill Education. Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., ... & Amodei, D. (2020). Language models are few-shot learners. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020 (pp. 1877–1901). Curran Associates, Inc. https://doi.org/10.5555/3455716.3455856
- Dashtipour, K., Gogate, M., Cambria, E., & Hussain, A. (2021b). A novel context-aware multimodal framework for Persian sentiment analysis. Neurocomputing, 467, 116–127. https://doi.org/10.1016/j.neucom.2021.02.020
- Dashtipour, K., Gogate, M., Gelbukh, A., & Hussain, A. (2021a). Extending Persian sentiment lexicon with idiomatic expressions for sentiment analysis. Social Network Analysis and Mining, 12(1), 9. https://doi.org/10.1007/s13278-021-00840-1
- Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019). BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (pp. 4171–4186). Association for Computational Linguistics. https://doi.org/10.18653/v1/N19-1423
- Farahani, M., Gharachorloo, M., & Manthouri, M. (2023). Persian text sentiment analysis based on BERT and neural networks. Iranian Journal of Science and Technology, Transactions of Electrical Engineering, 47(4), 1623–1634. https://doi.org/10.1007/s40998-023-00626-5
- Frangidis, P., Georgiou, K., & Papadopoulos, S. (2020). Sentiment analysis on movie scripts and reviews. In I. Maglogiannis, L. Iliadis, & E. Pimenidis (Eds.), Artificial Intelligence Applications and Innovations (pp. 423–436). Springer. https://doi.org/10.1007/978-3-030-49161-1_36
- Heydari, M., Khazeni, M., & Soltanshahi, M. (2024). Deep learning-based sentiment analysis in Persian language. arXiv. https://doi.org/10.48550/arXiv.2403.11069
- Khadiivar, A., Omaan, P., & Abbasi, F. (2023). Tahlil-e ehsāsāt-e kārbārān-e shabakeh-ye ejtemāʿi-ye Twitter dar mored-e teknoluzhi-ye Chet-Ji-Pi-Ti [Sentiment analysis of Twitter social network users regarding ChatGPT technology]. Modiriyat-e Ettelāʿāt [Information Management], 9(1), 159–182. https://doi.org/10.22034/AIMJ.2024.431651.1576
- Ligthart, A., Catal, C., & Tekinerdogan, B. (2024). Systematic reviews in sentiment analysis: A tertiary study. Artificial Intelligence Review, 57(4), 1–25. https://doi.org/10.1007/s10462-021-09973-3
- Loshchilov, I., & Hutter, F. (2017). Decoupled weight decay regularization. arXiv. https://doi.org/10.48550/arXiv.1711.05101
- Mohebbi, H., & Torfi, S. (2025). Āyandeh-pazhūhi-ye tūseʿeh-ye hūsh-e masnūʿi dar Īrān bā rūykard-e senāryū-nevisi [Futures studies on artificial intelligence development in Iran with a scenario planning approach]. Motāleʿāt-e Modīriyat-e Kesāvarzi-ye Hūshmand [Smart Business Management Studies], 14(53), 159–204. https://doi.org/10.22054/ims.2025.84715.2597
- Nandwani, P., & Verma, R. (2021). A review on sentiment analysis and emotion detection from text. Social Network Analysis and Mining, 11(1), 81. https://doi.org/10.1007/s13278-021-00776-6
- Pólya, T., & Csertő, I. (2023). Emotion recognition based on the structure of narratives. Electronics, 12(4), Article 919. https://doi.org/10.3390/electronics12040919
- Poria, S., Cambria, E., Hazarika, D., Majumder, N., Zadeh, A., & Morency, L.-P. (2017). Context-dependent sentiment analysis in user-generated videos. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) (pp. 873–883). Association for Computational Linguistics. https://doi.org/10.18653/v1/P17-1081
- Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., ... & Liu, P. J. (2020). Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140), 1–67. https://jmlr.org/papers/v21/20-074.html
- Rahmani Zardak, S., & Rasekh, A. H. (2023). Persian text sentiment analysis based on BERT and neural networks. Iranian Journal of Science and Technology, Transactions of Electrical Engineering, 47(4), 1623–1634. https://doi.org/10.1007/s40998-023-00626-5
- Russell, J. A. (1980). A circumplex model of affect. Journal of Personality and Social Psychology, 39(6), 1161–1178. https://doi.org/10.1037/h0077714
- Valizadeh Hamzekolaei, E., Khadiivar, A., & Abbasi, F. (2024). Tahlīl-e ehsāsāt dar shabakeh-hāye ejtemāʿī barāye arzyābī-ye olgu-ye sazmān-hāye gheyre-enteqāfī [Sentiment analysis in social networks for evaluating the performance of nonprofit organizations]. Motāleʿāt-e Modīriyat-e Kesāvarzi-ye Hūshmand [Smart Business Management Studies], 13(51), 217–234. https://doi.org/10.22054/ims.2024.81453.2505
- Wolf, T., Debut, L., Sanh, V., Chaumond, J., Delangue, C., Moi, A., ... & Rush, A. M. (2020). Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations (pp. 38–45). Association for Computational Linguistics. https://doi.org/10.18653/v1/2020.emnlp-demos.6