(IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 13, No. 12, 2022 Emotion Detection from Text and Sentiment Analysis of Ukraine Russia War using Machine Learning Technique Abdullah Al Maruf 1 , Zakaria Masud Ziyad 2 , Md. Mahmudul Haque 3 , Fahima Khanam 4 Department of Computer Science and Engineering, Bangladesh University of Business and Technology Mirpur, Dhaka, 1216, Bangladesh Abstract—In the human body, emotion plays a critical func- tion. Emotion is the most significant subject in human-machine interaction. In economic contexts, emotion detection is equally essential. Emotion detection is crucial in making any decision. Several approaches were explored to determine emotion in text. People increasingly use social media to share their views, and researchers strive to decipher emotions from this medium. There has been some work on emotion detection from the text and sentiment analysis. Although some work has been done in which emotion has been recognized, there are many things to improve. There is not much work to detect racism and analysis sentiment on Ukraine -Russia war. We suggested a unique technique in which emotion is identified, and the sentiment is analyzed. We utilized Twitter data to analyze the sentiment of the Ukraine- Russia war. Our system performs better than prior work. The study increases the accuracy of detecting emotion. To identify emotion and racism, we used classical machine learning and the ensemble method. An unsupervised approach and NLP modules were used to analyze sentiment. The goal of the study is to detect emotion and racism and also analyze the sentiment. Keywords—Emotion detection; racism; sentiment analysis; so- cial media; machine learning; ensemble; Ukraine-Russia I. I NTRODUCTION Emotion is a strong feeling caused by one’s circumstances and conditions, moods, interpersonal connections, or pleasure and dissatisfaction. The emotional experience includes per- ceptions of the world, cognitive capacities, behavioral reac- tions, metabolic anomalies, and instrumental activity. Emotions are difficult to define because they are a fleeting state of mind. Images, speech, facial expressions, textual information, emoticons, and other kinds of expression may all be used to determine emotion. Textual data is essential for research [1]. Massive amounts of text-based data have been generated regularly in recent years via social media and conversations such as messenger, Whatsapp, Twitter, and other means [2]. The progression of digital communications and its popularity, particularly virtual networking, keeps individuals interested in how they connect and communicate amongst themselves. People have become accustomed to expressing feelings lightly and intuitively through social media communication and the simplicity of responses. People use social media to keep up with what’s happening in the world and to share their opinion and feedback via likes, comments, and shares, among other things [3]. Today’s most popular social media platforms are Facebook, Twitter, and Instagram. People visit Facebook to keep in touch with friends, family, and loved ones, learn about what’s happening worldwide, and express what’s important to them, according to Facebook’s vision and mission. People incline to be more verbose on Facebook, yet posts go through more simple “likes” than lengthy comments. Since February 2017, Facebook has included additional capabilities that allow users to express their specific feelings in reaction to a post, such as the ability to mention “love” or “sadness” instead of liking a post [4]. People use Twitter to express their thoughts, feelings, and views through short messages or tweets at any time. Individuals’ emotional states of mind, such as joy, worry, and hopelessness, are captured overtly or indirectly within those short messages along with bigger communities, such as the viewpoints of people in a particular country [5][6]. There are five ways to emotion identification from text, including keyword-based, lexical/corpus-based, learning- based, hybrid-based, and deep learning-based approaches, but each has its limitations[7]. Specifically, identifying ob- ject words from tweets is named object-oriented feature to perform sentiment—Bi-gram, uni-gram model with object- oriented feature effective better [8]. Emotion was discovered and recognized using machine learning and deep learning methods. There are also several classifications for identifying emotions; some of them are the k-nearest neighbor(KNN) algorithm, Support vector machine(SVM), decision tree(DT), random forest(RF), linear discriminant analysis(LDA), etc. DT is a decision support tool that uses a tree-like graph or model of decisions and their possible consequences, KNN is a method for classifying objects based on closest training examples in the feature space, LDA is a method used in statistics, pattern recognition, and machine learning to find a linear combination of features which characterizes or sep- arates two or more classes of objects or events and SVM analyze data with recognizing patterns used for classification and regression analysis. Based on the lexical approach, Real- time emotional analysis was carried out, and the data was obtained from online social media[9]. Sentiment analysis may be performed using a deep learning model that has been pre- trained, as well as unsupervised algorithms such as Valence Aware Dictionary and sEntiment Reasoner(VADER), textblob, and k-means clustering. It’s also possible to gauge sentiment using lexicons. The sentiment was analyzed using large-scale data from Twitter and a machine learning-based technique. Sentiwordnet and sentiment are sentic computing-based pub- lic lexicons [10]. Emotion is identified from audio sources following machine learning techniques and categorized into six basic emotions. Auto weka performed the best outrun compared to SVM, KNN, and multi-layer perceptron (MLP) [11]. Finding out mental instability RF shows (87%) accurate www.ijacsa.thesai.org 868 | Page