We proposed combine approach of BiLSTM and CNN to capture the emotional information from the words we are going to train BiLSTM model to get the semantic information from the words and parallelly we will be training CNN to get emotional information from the words.
We will be using FastText word vector method for obtaining vectors from words unlike Word2Vec it operates at more minute level with character n grams. CNN and RNN are more efficient in finding the patterns out of large dataset. Due to the Word2Vec it opened entirely new approach to NLP. LSTM algorithms are quite popular in NLP field there were used in many emotion detection model due to their ability to find semantic meaning of words but they fail to capture information about the words. CNN models are quite fascinating and due to their ability to find the complex pattern among the images they are getting lot of attention in NLP. But, they are subjected to many limitations as network is designed to handle single dimension so it became vague how they are going to generalizes multi class prediction.
Introduction
I. INTRODUCTION
Emotion recognition is a system designed to better understand people’s feelings and emotions. It also helps us understand the behavioral aspects of human nature by analyzing facial expressions, vocal expressions, or textual content. These days, there is a lot of data that expresses emotions in the form of tweets, posts, comments, blogs, etc. Input data varies in other forms, such as body movements, health reports, blood pressure, heart rate, and respiratory rate. We proposed to combine BiLSTM and CNN approaches to obtain sentiment and semantic information from words.
We train a BiLSTM model to obtain semantic information from words, and train a CNN in parallel to obtain sentiment information from words. To get a vector from a word, use the FastText word vector method. Unlike Word2Vec, it works at a finer level on characters and grammar.
II. RELATED WORK
The research paper
Sentiment Analysis of Text Based on Bidirectional LSTM with Multi-head Attention focused on the performance of the embedding layer, glove, and word2vec by applying them on a specific data set, trying to determine the optimal word embedding algorithm. The authors of this paper are Fei Long, Kai Zhou, Weihua Ou. The dataset used is based on product reviews of Taobao e-commerce platform. The algorithms used in this paper involve combining Bidirectional Long-Short Term Memory (BiLSTM) networks with a Multi-head Attention (MHAT) mechanism. The research paper.
Sentiment Analysis of Comment Texts Basedon BiLSTM shows a sentiment analysis method of comments based on BiLSTM is proposed and applied to the comment sentiment analysis task. The authors of this paper are Guixian Xu 1, Yueting Meng1, Xiaoyu Qiu2, Ziheng Yu 1, Xu Wu. The accuracy of the model was upto 88.46 percent. The algorithm used is bidirectional long short term memory (BiLSTM). The research paper.
Sentiment Analysis Research from Text using Deep Learning Methods focused on CNN, gives an insight on sentiment analysis research from text using deep learning methods, there are descriptions from encoder-decoder and attention model mechanism. There is given some information about Deep learning and CNN and there are emotional analysis which involves mood like happy, sad, angry, fear, joy, and disgust while sentiment analysis involves categories positive, neural and negative. The research paper.
SEDAT: Sentiment and Emotion Detection in Arabic Text using CNN-LSTM Deep Learning focuses on SEDAT, which has the ability to determine the existence and the intensity of an emotion (Anger, Joy, Fear, or Sadness) in an Arabic tweet as a real-valued score between 0 (least intensity) and 1 (most intensity). It also classifies the intensity of emotion into one of four ordinal classes (0: no emotion, 1: low emotion, 2: moderate emotion, and 3: high emotion). The research paper.
Deep Learning Based Sentiment Analysis Using Convolution Neural Network they applied CNN to perform the SA of Hindi movie reviews. The experimental results suggest that properly trained CNNs can outperform the baseline ML algorithms for sentiment classification. In our model, the sentences of reviews are labelled into three classes such as positive, negative and neutral. All the experiments are performed using different parameter settings for all CNN models, and it has been observed that CNN model and is able to achieve an accuracy of 95 The research paper.
Sentiment Analysis using Word2vec-CNN-BiLSTM Classification focuses on:
a. Proposing a mix model of short text calculation based on Word2vec, CNN and BiLSTM;
b. The results of emotion analysis were used as samples to realize the parameter training of word2vec-CNN-BiLSTM model;
c. Comparing the accuracy results of multiple models on Quora data set.
II. PROPOSED SYSTEM
A. Research
Aim to develop a model that can recognize emotion using text on social media. Emotion is expressed as joy, sadness, anger, surprise, hate, fear and so on. Detecting emotions based on related keywords is an easy to use and straightforward method. The recognition of text from the scene needs special features because the character present in the scene may differ in size, shape, colour, writing style, orientation, aspect ratio, quality of the image due to different lighting conditions, and blurred and complex background.
These are the various challenges of text detection and text recognition. Generally, text detection identifies the location where exactly text is present in the image and creates a bounding box for each word or letter or line of text, and it also improves the accuracy of text recognition.
B. Design And Method
Take a text message for generated text.
Read data text.
Load the pre-trained word vector
Build the classification layer which can classify the emotion
Give the automatic emotion with respect to the text.
C. Reason For The Project
As we can see in day to day life there are more violence activities can take place due to the incorrect words spoken by the people or misunderstandings. Sometime the person might have different motivation than what was received by the other person which can lead to the violence activity.
To stop or to reduce this kind of activity and give a good form of message to the other and understand the emotions behind their message is the main reason.
There are many methods which can be used for this project but we have used CNN AND BILSTM. The main reason is that every component of an input sequence has information from both the past and present. For this reason, BiLSTM can produce a more meaningful output, combining LSTM layers from both directions.
IV. SYSTEM DESIGN
A. UML Diagrams
UML stands for Unified Modeling Language and is commonly used to understand the relationships between external users and system components.
UML diagrams also help you understand how users interact with your system. In Unified Modeling Language (UML), use case diagrams can summarize the details of how users of a system (also called actors) interact with the system. To create it, we use a special set of symbols and connectors.
B. Data Flow Diagram
1) Data Flow Diagram Level 0
A data flow diagram shows how information flows through a process or system. This includes data input/output, data storage, and various subprocesses through which data moves. DFDs are created using standardized symbols and notations to describe various entities and their relationships. DFD Level 0 diagram represents the abstraction view which shows system as a single process with its relationship with external entities.
V. ALGORITHMS
Algorithms for the NLU part of the system using which the results were collected has the following specifications:
X86-64 Architecture
Intel i5-7200 CPU
512 GB SSD, 8GB RAM
Python 3.6.9
NLTK Library 3.4.5
Conclusion
We have successfully presented a preliminary project report presented on CNN BiLSTM Model for Emotion Detection on WhatsApp Clone, illustrating in detail the system requirement, data flow diagram and other required documents that can be referred as a guide during the implementation of the system. Our primary objective is to generate emotions from given real-world text inputs. We have developed a combined CNN BiLSTM model to capture semantic and emotional information from text. This will help overcome drawbacks from traditional singular deep learning models.
References
[1] F. Long, K. Zhou, and W. Ou, “Sentiment analysis of text based on bidirectional lstm with multi-head attention,” IEEE Access, vol. 5, p. 15, 09 2019.
[2] G. Xu, Y. Meng, X. Qiu, Z. Yu, and X. Wu, “Sentiment analysis of comment texts based on bilstm,” IEEE Access, vol. 7, no. 5, pp. 51 522–51 532, 2019.
[3] Hannah Kim and Young-Seob Jeong, ”An Insight on Sentiment Analysis Research from Text using Deep Learning Methods,”Appl. Sci. 2019, 9, 2347 6, 2019
[4] Malak Abdullah, Mirsad Hadzikadic and Samira Shaikh, ”SEDAT: Sentiment and Emotion Detection in Arabic Text using CNN-LSTM Deep Learning”2018 17th IEEE International Conference on Machine Learning and Applications 2018
[5] Sujata Rani, Parteek Kumar, ”Deep Learning Based Sentiment Analysis Using Convolution Neural Network” Arabian Journal for Science and Engineering (2019) 44:3305–3314
[6] W. Yue and L. Li, “Sentiment analysis using word2vec-cnn-bilstm classification,”in 2020 IEEE Access, Seventh International Conference on Social Networks Analysis, Management and Security (SNAMS),vol. 7, no. 5, 2020, pp. 1–5