Keywords

1 Introduction

Sentiment classification is one of the most important tasks in social network analysis in current circumstance sentiment analysis for various social networking sites seems to be a very potential research equipment. The main reason behind this includes online user’s free authorization and assessment to their account whenever they want. Various recent surveys demonstrate that companies collect huge amount of data through the web to extend their customers satisfaction analysis. Setters can also watch terrorist’s activity through collecting data from web to extend sentimental analysis and are getting aware and taking steps about their baleful events. The authors used sentimental analysis to find the imaginative sentiment automatically from uses reviews [1]. Sentiment analysis is a natural language processing problem where text is understood and the underlying intent is predicted. Few authors have already published lots of contributions associated with sentimental analysis. Most of the contributions have been accomplished targeting to twitter, product reviews, political party, tweet updates, brands of products [2]. These system expresses a positive or a negative opinion(e.g., blog post, product review, etc.) about a given entity(e.g., product, policy, person etc.). Before imposing appropriate mechanism over data they collect raw data from twitter or facebook and apply their implemented methods on the data they gathered. Since, twitter has a restriction of using 140 characters of total length while posting something in twitter [2], thus users supposed to get narrow scope to express their thoughts, expressions, emotions.

In general, recent years highly keep in touch with available social networks and collaborative technologies. Thousands of research associated with social media has been conducted already. However, various study demonstrate that this social media and collaborative technology can negotiate with traditional way of learning into a collaborative one [3]. Meanwhile, social media seems to be effective in health care technology areas also. For the time being health care is becoming sharing and cooperative which makes realizing about the necessity of social media technologies. Moreover, for present time online based social networking sites are providing the platform for the people to express their opinions, thoughts, emotions, short messages etc. within a second of click. With the help of social networks nowadays it’s easier to be interconnected. This phenomenon results with effective outcome. However, with the increasing effectiveness of social networks and collaborative technologies the data passing through various platforms associated with these appeared to be a great evolution. Enormous posts, comments, emotions, reactions etc. are need to be manipulated with the shortest possible time. Despite all of this present circumstances of various social networks negotiate with lots of real life conditions among which advertisement of various products and prospects are comparatively most significant. Thus, social networks play an important role in this era providing multimedia enriched data, aggregated feedback and personal information sharing. Among all the social networks Facebook is considered most popular one by connecting every stages of people together within a single shade. According to Wikipedia Currently Facebook is dealing with approximately 2 billion people, twitter with 319 million users, 375 million users. However, the researchers are mainly concerns with determining exact sentiment, emotions, and reactions filtering lots of multimedia based data. Thus, this study is concerned with this issue.

In this paper, in most cases we have concentrated on Facebook as our targeted website. From the perspective of virtual world status is creating an updated feature of regular activity, thoughts, emotions etc. From users side. Facebook has a total number of 5000 characters for updating every status which has a big difference from Twitter [4]. Therefore, the main advantage is people transpired emotions clearly which is desirable. Total Facebook users are enormous and so it is much easier to collect samples. Analyzing these samples we can get identify user’s motion of interest which would be good enough. Realization of different ways in which texts are seems to be appeared on Facebook can help us to improve our products.

According to June 2017, a survey [5] on Facebook statistics shows Every 60 s on Facebook: 510,000 comments are posted, 293,000 statuses are updated. Understanding the various ways texts are used on Facebook can help us to improve our products. In general, whenever a user expresses his views, it becomes important for the community to correctly identify the requirements of user to make him stay longer. By the analysis of product reviews given by the customers, an organization can decide about the future circumstance on any particular product. Thus, it becomes mandatory for the organizer to analyze the comments given in social media to extract any essential information from huge volume of data. However, the annual tweet growth rate for twitter from 2006 to 2013 [6] is followed by Fig. 1.1.

Fig. 1.1
figure 1

Graphical representation of tweets rate of growth [55]

In general, sentiment analysis or opinion mining is a most hotly debated topic nowadays. This is basically the computational illustration of people’s comments, attributes, comments, posts, and tweets on any specific issue. Those issues can demonstrate both individuals as well as events and topics. However, both the topic sentiment analysis and opinion mining refers to interchangeable circumstances of some issues. Despite of this some of the researchers in this field who have conducted various contributions have estimated that both of the term SA (sentiment analysis) and OM (opinion mining) indicates different motion rather than indication same dimension. According to their derivation, sentiment analysis is such kind of machine learning approach which works with opinion mining whereas sentiment analysis refers to the sentiment explicated on various issues for this context in various tweets. Therefore, according to sentiment analysis this specific topic illustrate opinions regarding a topic or event then identifying the sentiment expressed by the users and determining their polarity. Basically, sentiment analysis overall process is the combination of three kinds defined as document-level, sentence-level, and aspect-level [7]. Initially, the given sentence will be evaluated whether it is a subjective or objective sentence. Thereafter, SA will determine which sentiment is depicted by the sentence given. Since current world is stepping towards the evolution of higher dimensional, complex and complicated data, it will be main obstacle for the previous methods to cope with new dimension of data. Moreover, various social network associated data like those information produced from twitter, Facebook, Google etc. are increasing in an exponential manner and for which it demands strong fundamental machine learning approaches to be in action to manipulate with better accuracy and efficiency [8]. Realizing the worth of this issue we have concentrated on convolutional neural network as well as Recursive tensor neural network for sentiment analysis and text mining. Our derived approaches represents better performance for conducting this task. However, for this study we only highlight on English data classification or analysis. Our future contribution may include all the available language data analysis. However, collected data can be noise full, irreverent which are considered to be the main obstacle for the context of accurate analysis and efficient classification of sentiment provided by the users un some specific events, topics etc. therefore, various mapping algorithms like self-organization map, Ordinary Least Squares Regression (OLSR), Linear Regression., Logistic Regression., Stepwise Regression., Multivariate Adaptive Regression Splines (MARS), Locally Estimated Scatter plot Smoothing (LOESS) those algorithms are highly appreciated. Thus, our future contribution will include mapping based machine implementation of mapping based machine learning algorithms for sentiment detection and opinion mining.

2 Literature Review

Many authors applied and contributed different methods for performing sentimental analysis. Alongside, lots of researchers have used deep learning, machine learning, vector machine etc. In literature, lots of outperformers’ methods have been exposed through various researchers in paragraph and sentence level. In [9], the contributors have drawn their attention towards minimum cut in text graphs to achieve the main partition of the words from the whole text. Moreover, though the use of machine learning methods they have performed sentiment analysis on the selected texts only. In [10], the authors have embedded convolutional neural networks to train handwritten digits. The researchers of this work have been able to take their performance to the highest level though demonstration of 99.6% accuracy. In [11] authors have used different techniques to reduce over fitting and they have improved the performance to a top level up to 99.67%. They have emphasized on 10,000 MNIST test images (seen except training session) and the system defined by them determine 9,967 correctly. From rest 33 images many of those are tough even for a human being to differentiate. They used an ensemble of networks and build a model to improve entire performance. In [12], the contributors mentioned support vector machine mechanism for better classification from various data source collected from specific social networks. In [3], initially the authors have classified texts into neutral and polar first then have determined whether the text is expressed as positive or negative sentiment. In [13], the authors have depicted distant learning approach to differentiate sentiment analysis data. They have emphasized on twitter’s every tweet’s concluding emotions. If concluding emotions are in positive emoticons like “:)”, “:-)” are considered as positive and if rest emotions are appeared like “:(”, “:-(” then that will be considered as negative. They build models using different classifiers and report that Support Vector Machines (SVM) outperforms other classifiers comparatively. They also have employed different models in terms of feature space and they report that Unigram model outperforms all other models. Moreover, according to the contribution mentioned in [14] overall sentiment has been taken in account rather than concentrating on topic based analysis which is fruitful when overall input datasets are noise free or irreverent free. But from the perspective of big data analysis or noise full data this contribution can be detected as slower prediction mechanism. In this respect of view our contributed approach works better even after the presence of noise or irreverent data. Another contribution regarding sentiment analysis [15] indicate the use of corpus for sentiment analysis as well as decision or opinion mining. This contributions reveals that their proposed approach represents higher accuracy along with efficiency for twitter data analysis. Initially for this they have drawn their attention towards prediction of positive, negative and neutral sentiments for every document they have in English language. The authors also demonstrate that their future work will be conducted on all the language available currently. Since our contribution highlights on various neural network based algorithm to train the datasets, thus overall accuracy as well as efficiency outperforms its alternatives. Additionally, the work [16] has explored lots of work associated with sentiment analysis in recent time. Details discussion of various works create a new way to know gist content in a while.

More research on sentiment analysis along with big data has been also conducted by thousands of researchers. Among them the contribution [17] deals with vast amount of sentiment rich data or texts through status updates, reactions, comments, likes, tweets etc. the authors of this paper have highlighted into analysis of sentiment for electronic devices including mobiles, Tabs, laptops etc. to be user friendly than before. They have demonstrated that through the use of sentiment analysis in specific domain the effect of domain information can be extracted easily. Along with analyzing vast amount of data the authors have also implemented a new feature defined as vector classifier for determination of more accuracy. According to the contribution of [18], the authors in this study mostly concentrated on feature selection, negation dealing and emotion handling. For the purpose of increasing performance of machine learning algorithms this study negotiates with huge numbers of text datasets like tweets or movie reviews and evaluates the performance of machine learning algorithms. Thus, evaluation of public opinion as well as sentiment analysis has been taken into account in this study for enhancement of available machine learning algorithms in this field. Intuitively, the study [19] refers to illustration or details demonstration of those datasets which are increasing in an exponential manner including contents on the Web like twitter, amazon, Facebook etc. since these types of large volume of data can create a great harm for the efficiency as well as accuracy and sensitivity of machine leaning algorithms. From the perspective of contribution [20] lots of papers regarding sentiment analysis have been explored in details for probable acquisition of whole knowledge at a time from one paper. Moreover, nowadays Facebook, twitter, amazon and other social websites support the feature of using various slang, Gif images, emotions, reactions, comments which are mainly responsible for production of higher dimensional large volume of datasets. This study also concentrates on this issue and demonstrates the machine learning ways through which we can resolve these types of problems. Since nowadays the datasets are increasing in an exponential manner for which the classification task is becoming slower data by day. Avoiding this situation various mapping based machine learning approaches can be most helpful for classification, feature detection as well as to resolve inefficient sentiment analysis problems. In this respect [21,22,23,24,25,26,27] these study have proposed various mapping less as well as mapping based algorithms which are capable of classifying the data in a complex as well as complicated situation. However, another studies mentioned in [28,29,30,31,32,33,34,35,36,37] highlights various automated machine learning system for manipulation of imbalance, large volume of data and also to extract gist information from data gathered from Facebook, tweeter data. Details performance evaluation also demonstrates outperformances of those algorithms implemented and proposed in those contributions. Moreover, [38,39,40,41,42,43,44,45,46,47,48] contributions highlight developing various artificial intelligence algorithms which are capable of conducting various classification as well as alignment task with higher accuracy and efficiency compared to other alternatives in literature.

3 Deep Learning Algorithms (CNN) Used in Sentiment Analysis

Basically, deep learning refers to combination of various algorithms. Such as Convolutional Neural Network (CNN) extended version of neural network (NN), Recursive Neural Tensor Network (RNTN) extended version of Recursive NN basically concerned with the use of specific sparse tree for every input data, Recurrent Neural Network (RNN) etc. those are very popular. Basically NN are very efficient for text generation, image classification, pattern classification, vector representation, classification of sentence etc. [49]. Deep learning networks can be used for its automatic learning capability and we can training for supervised as well as unsupervised both [50]. Due to supervised and unsupervised learning techniques deep learning is very useful. Many researchers used deep learning for handle sentiment analysis. Authors used data from rottentomatoes.com and make the representation of movie review by using Recursive Tensor Neural Network (RNTN) [51].

3.1 CNN (Convolutional Neural Network)

In general, convolutional neural network is the extended version of previously revealed neural network. This new version of neural network includes one of the amazing features defined as multiple perceptron. From the perspective of artificial neural network this term multiple perceptron focuses on lesser preprocessing which was not included in the previous neural network. Therefore, for this extraordinary feature of convolutional neural network this mechanism performs better compared to all the previous neural nets. Moreover, this specific capability which convolutional neural nets owns inside itself makes the way easier by processing the input data initially just to avoid redundant or irreverent data. Basically, this evolutionary algorithm got concentrated on after successful interpretation of a well-known research work explored by LeCun and Bottou [52]. This work illustrates CNN as inspired by biological knowledge as well as mathematical theorem along with co-operation of computer science. Therefore, for this study the convolutional neural network is being focused for its extraordinary ability of dimensionality reduction along with pre-processing strategy built in inside it. The basic infrastructure of convolutional neural network is illustrated in Fig. 1.2.

Fig. 1.2
figure 2

Overall infrastructure of convolutional neural network

Mathematical derivation of convolutional neural network illustrates a straightforward way of representing an overall process of machine learning algorithm. In usual cases, the input matrix size of convolutional neural network covers the input image or datasets successfully. However, the back-propagation paradigm is one of the glamorous thing to be attracted by convolutional neural network. The general back propagation algorithm for convolutional neural network is demonstrated as follows:

Thus, discussion conducted above represents the successful illustration of convolutional neural network algorithm for the purpose of sentiment analysis. Here initial phage depicts input datasets in a compacted matrix. Subsequently, computation of \( p_{x,y}^{i} \) for each and every iteration becomes mandatory on the initial input datasets compacted within a matrix. Meanwhile, estimated output error need to be concentrated on for successfully implementation of back-propagation algorithm. If error seems to be appeared then using back-propagation mechanism we need to propagate the error and need to be minimized the error as much as possible. Now, gradient function is usually used for achieving desired output from the overall CNN approach.

Basically, the input matrix of convolutional neural network covers overall input data. Besides, internal calculation is simpler to define and easy to implement. For interpretation of CNN if we have \( NxN \) input matrix and if we consider a \( KxK \) filter \( \omega \) then overall outcome matrix will be \( (N - K + 1) \times (N - K + 1) \). Thus, outcome of 1st layer \( \left( {O_{ij}^{l} } \right) \) same time input of 2nd layer \( \left( {O_{ij}^{l} } \right) \) can be defined as follows,

$$ O_{ij}^{l} = \sum\limits_{a = 0}^{K - 1} {\sum\limits_{b = 0}^{K - 1} {\omega_{ab} y_{(i + a)(j + b)}^{l - 1} } } $$
(1.6)

However, outcome of convolutional neural layer is depicted using following equation in practical,

$$ C_{ij}^{l} = \sigma (O_{ij}^{l} ) $$
(1.7)

Meanwhile, error calculation rate \( \left( {\frac{\partial E}{{\partial C_{ij}^{l} }}} \right) \) which is defined as partial derivative of error rate (E) with respect to the outcome of previous calculation layer is mandatory to summarize to determine all the output of each neuron lies on any layer. Therefore, the equation is,

$$ \frac{\partial E}{{\partial \omega_{ab} }} = \sum\limits_{i = 0}^{N - K} {\sum\limits_{j = 0}^{N - K} {\frac{\partial E}{{\partial O_{ij}^{l} }}\frac{{\partial O_{ij}^{l} }}{{\partial \omega_{ab} }} = } } \sum\limits_{i = 0}^{N - K} {\sum\limits_{j = 0}^{N - K} {\frac{\partial E}{{\partial O_{ij}^{l} }}C_{(i + a)(j + b)}^{l - 1} } } $$
(1.8)

For further proceedings what we need to do is to compute the gradient. Computation of gradient can be demonstrated as,

$$ \frac{\partial E}{{\partial O_{ij}^{l} }} = \frac{\partial E}{{\partial C_{ij}^{l} }}\sigma^{!} (O_{ij}^{l} ) $$
(1.9)

Above all, for achieving final result following mathematical chain rule can be adjusted,

$$ \frac{\partial E}{{\partial C_{ij}^{l - 1} }} = \sum\limits_{a = 0}^{K - 1} {\sum\limits_{b = 0}^{K - 1} {\frac{\partial E}{{\partial O_{(i - a)(j - b)}^{l} }}} \frac{{\partial O_{(i - a)(j - b)}^{l} }}{{\partial C_{ij}^{l - a} }} = } \sum\limits_{a = 0}^{K - 1} {\sum\limits_{b = 0}^{K - 1} {\frac{\partial E}{{\partial O_{(i - a)(j - b)}^{l} }}} } \omega_{ab} $$
(1.10)

Thus, above discussion bears the realization that Convolutional neural network (CNN) follows a specific infrastructure which particularly has been marked as better classifier. This mechanism is quite faster compared to other alternatives along with faster training facility and also allows us to train deeply by forming lots of network layers internally. Here for this context, we have explored some powerful techniques including convolutions, pooling, dropout technique (to reduce unnecessary data) etc. we have also used some integrating ideas such as softmax, back propagation, regularization etc. CNN is a combinational feature of three basic ideas- local receptive fields, shared weights and biases and pooling.

In usual cases, whenever a data is inserted into CNN it will be sent into different layers (first layer is considered input layer, last layer is considered output layer and in between first and last is hidden layers) subsequently and finally will produce sentimental results (e.g., positive, negative, neutral, etc.). However, every layer contains lots of neurons. For clarification we have considered that input layer contains 28*28 square of neuron and whose value corresponds to the 28*28 pixel. Basically, each and every neuron of any layer is fully connected to the neurons of their neighbor layer. However, in every local receptive field all the hidden neurons are not connected under manual supervision, rather each neuron will be connected to a small region of the input neurons. Graphical representation of local receptive field is as follows Fig. 1.3,

Fig. 1.3
figure 3

Basic infrastructure of Local receptive field

Same matrix is taken into account while considering bias, then the same weights and bias for each of the 24*24 hidden neurons will be applied to execute overall process. For the j, k hidden neurons, output is-

$$ \begin{aligned} & C(b + \sum\nolimits_{i = 0}^{4} {\sum\nolimits_{m = 0}^{4} {w_{l,m} a_{j + l,\,k + m} )} } ;\delta = neural\,activation\,function, \\ & b = shared\,value\,for\,bias, w_{l,m} = 5*5\,array\,of\,shared\,weights \\ \end{aligned} $$
(1.11)

Very often Eq. 1.11 is defined as convolution. Shared weights and biases greatly reduce total parameters involving in the convolutional network.

Pooling mechanism is usually used immediately after convolutional layers. The pooling mechanism usually filters the immediate output from the convolutional neural layer and also preprocess the resultant data. Each unit of a pooling layer mainly summarize approximately 2*2(say) neurons from whatever we get from the previous layer. A common procedure for pooling can be characterized as max pooling (Fig. 1.4).

Fig. 1.4
figure 4

Generalized form after applying max pooling

After pooling Softmax layer will be in action automatically to remove the problem of learning slowdown. This is basically used for faster as well as efficient learning process. We use softmax to create a new type of connection in the final layer. Because the connection between a hidden layer to next hidden layer is not fully connected. If we do not change the connection as fully connected, output of any neuron could be missed from last hidden layer.

$$ \sum\limits_{j} {a_{j}^{L} = \frac{{\sum\nolimits_{j} {e^{{z_{j}^{L} }} } }}{{\sum\nolimits_{k} {e^{{z_{k}^{L} }} } }}} = 1 $$
(1.12)

where, \( a_{j}^{L} \) = output activation for j neuron of L layer.

And \( z_{j}^{L} \) = corresponding weighted input for j neuron of L layer.

This equation shows us output of activations for j’th neuron of L’th layer are positive, because of positive exponential function and output range in between 0 to 1(positive, negative, neutral). Thus, all the functions are combined together and accomplished a convolutional neural network (CNN). This can be performed well in both supervised and unsupervised learning. However, for sentiment analysis a system has been proposed for twitter [53]. For this purpose they used convolutional neural network with initialize the weight. While they avoiding requirement for new features they find train accurately is critical (Fig. 1.5).

Fig. 1.5
figure 5

Overall basic infrastructure of this contribution

We will input a text into CNN and it will show the sentiment rate of positive, negative and neutral by using sentimental algorithms, build up by CNN (Table 1.1).

Table 1.1 Findings of sentiment analysis using CNN

3.2 Recursive Neural Tensor Network (RNTN)

In general, Recursive neural tensor networks (RNTNs) are some kinds of neural nets which are exceptionally useful for all kinds of language processing including natural language. They have specific tree structures corresponding to a neural net at each node. Basically, Recursive neural networks can be significant for the purpose of boundary segmentation, differentiation between positive and negative word groups etc. for sequential classification word vectors are usually referred as features and served as basic infrastructure, after which all the findings are compacted within various sub groups and phases for final sentiment determination purpose. For this contribution Recursive Neural tensor network performs better because of branching factor it uses. However, RNTN (Recursive tensor Network) usually deals with some specific structures or sparse tree for hierarchical processing of overall steps structured in a tree. This specific algorithm seems to be working better while time is not being concentrated on. This is basically a recursive chain process which follows one process after another. Sentiment analysis is also possible through the use of convolutional neural network but the main obstacle of using CNN in this circumstance is it never follows any concept of sparse tree for further proceedings whereas RNTN (Recursive tensor Network) is concerned with the use of specific sparse tree for every input data. In addition, the basic infrastructure in this work compute compositional vector representation of every phrase in each node of a binary sparse tree constructed while taking input. Further steps are followed by computation of parent vector in a bottom up fashion corresponding to the input sparse binary tree.

Thus, the above Fig. 1.6 mentioned here represents the structured illustration of input for recursive neural network. From the illustration we get informed that hierarchical analyzing technique has been the main mechanism for this specific circumstance. For this contribution this method contributes to analyze the data collected from one of the famous social media which is Facebook. Thousands of comments along with various emotions, reactions, observations have been depicted here in details. While working with bottom up fashion this algorithm basically labels all the words through vector analysis using the following formula,

Fig. 1.6
figure 6

Basic infrastructure of a hierarchical sparse tree

$$ y^{a} = soft\,\hbox{max} (W_{s} a) $$
(1.13)

For illustration of this equation we can conclude that \( W_{s} \) is the sentiment classification matrix applying the overall proposed approach on which we will acquire our desired output. Moreover, a is one of the vector through which every word has been labeled. However computing parent vector is mandatory for recursive neural tensor network. Therefore, the computation of target vectors can be defined through the formula mentioned below,

$$ t_{1} = f\left(W\left[ {\begin{array}{*{20}c} b \\ c \\ \end{array} } \right] \right)\,\,\,\& \,\,t_{2} = f\left(W\left[ {\begin{array}{*{20}c} a \\ {t_{1} } \\ \end{array} } \right] \right) $$
(1.14)

Here, f is considered as one of the element from standard nonlinearity function. Also w is the main parameter to learn whereas bias has been omitted for simplicity purpose. However, the bias can be added to the overall vectors through the addition of an extra column especially for the bias. One of the main problem for almost all the neural nets are seems to be appeared when the parameters become large and inhabited as indivisible. For those circumstance recursive neural tensor network outperforms most. Though the use of single layered vector form if we want to define overall output the then that should be taken place as the following,

$$ O_{i} = \left[ {\begin{array}{*{20}c} b \\ c \\ \end{array} } \right]^{T} V^{i} \left[ {\begin{array}{*{20}c} b \\ c \\ \end{array} } \right] $$
(1.15)

For the context of Eq. 1.15 the \( V^{i} \) is the tensor form of the multiple bilinear form. \( O_{i} \) (Output) is the ith output tensor term which is the desired expectation of our proposed system. For recursive neural tensor network to achieve any concluding point the parent vectors usually defined as \( P_{1} \& P_{2} \) must be defined and calculated. For this contribution the parent vectors have been calculated through the use of following formulation,

$$ P_{i} = f\left(\left[ {\begin{array}{*{20}c} b \\ c \\ \end{array} } \right]^{T} V^{i} \left[ {\begin{array}{*{20}c} a \\ {P_{i} } \\ \end{array} } \right] + W\left[ {\begin{array}{*{20}c} a \\ {P_{i} } \\ \end{array} } \right] \right) $$
(1.16)

Here, ith number if parents definition has been calculated through Eq. 1.16. Intuitively, one special case for the RNTN algorithm is when i = 0 the infrastructure can directly relate to the input datasets which results in efficient and faster calculation to the way of output.

For organizing sentences, recursive neural nets work as parsers, which after parsing groups all the negative as well as positive words within particular groups for further calculation. Some sub groups and phases are also created in this stage of recursive neural nets. The sub phases includes Noun phases (NU), Verb phases (VP) etc. further steps depend on various machine learning algorithms to classify exact sentiment. By parsing the sentences, they can be successfully structured as tress which is ordinarily known as parse trees (Fig. 1.7).

Fig. 1.7
figure 7

Graphical representation of constituency based parse tree

In [54], authors propose a Recursive Neural Tensor Network (RNTN). The contributors of this work draw their main concentration towards tensor-based composition function for sentiment analysis. And record that RNTN perform better than other methods of Deep Learning.

So we can use the idea of RNTN to analyze the sentiment. RNTN use 5 sentiment classes, very negative to very positive (– –, –, 0, +, + +), at every node of a parse tree and capturing the negation and its scope in given sentence.

In Fig. 1.8 we can see that RNTN cannot detect any emotion sign “☹’’. And this is like supervised learning so ‘boring’ get the very negative sign. Despite of these, RNTN is quite good for text and its accuracy rate also good.

Fig. 1.8
figure 8

Analyzing a sentiment using RNTN algorithm

3.3 Detection of Positive, Negative and Neutral Sentiment

A simplest technique called ‘Keyword Spotting’ used in sentimental algorithms. After input the data it is scanned for detecting the positive and negative words like ‘love’, ‘happy’, ‘good’, ‘bad’, ‘sad’, ‘terrible’ and ‘great’ etc. This approach is called ‘Bag of Words’ (BOW). This contains information of sentiment along with sentiment scores. Like the word ‘bad’ is negative and the word ‘love’ is positive. Some list of words in BOW given below in the Table 1.2:

Table 1.2 List of positive negative word from BOW

Then use negation detection measures to differentiate between ‘happy’ and ‘not happy’. Thus we can go for a phrase ‘not happy’ is negative sentimental. Based on those words, algorithm shows the sentiment rate of positive, negative and neutral. Thus we do not use NLP, sarcasm problem might arise. For example, “Wow, thanks for show your reality”, may be a negative sentence rather than positive one. To solve it, we have to do Natural Language Processing. In our future work we will do this.

3.4 RNTN Compared to CNN

By applying recursively same set of weights RNTN created. RNTN is successful for tree structures, learning sequence in NLP. Sentiment analysis is possible through the use of convolutional neural network but the main obstacle of using CNN in this circumstance is it never follow any concept of sparse tree for further proceedings where as RNTN (Recursive Neural Tensor Network) is concerned with the use of specific sparse tree for every input data. For example, this is a movie review “First half is interesting, but last half is boring☹”. The sentences have both positive and negative sentiment. Thus RNTN create a tree structure where RNTN make two part of this sentence based on some logical terms [56], one is positive part (First half is interesting,) another is negative part (but last half is boring☹). But in CNN it will show an overall rate of positive, negative and neutral based on words (positive, negative).

3.5 Comparison of Different Sentimental Analysis Techniques

In research area, sentiment analysis played an important rule. Many researchers discussed about different methods of sentiment analysis. Many researches are still going on to find out the efficient and alternatives approach for sentiment analysis. There are many methods of sentiment analysis such as- Machine Learning Approach, Rule Based Approach, Lexicon Based Approach, and others. Table 1.3. Shows three main techniques used for sentiment analysis. Every technique has some strength and limitation of its own.

Table 1.3 Comparison between different techniques of sentimental analysis

In our paper we used machine learning approach which is for both supervised and unsupervised learning. CNN works as unsupervised and RNTN works as a supervised.

4 Discussion

Before start working in this paper, we collected thousand of raw status from Facebook. We collected data from students aged 16 to 22. Since we did not use any tools, we collected data in simple way. We told all students to add one common account (created for our research purpose) to their Friendliest. Then we access the data from the common account. This was the primary process of our data collection which was only for learn ‘how to collect data directly?’But this process is time consuming.

Then we started to use “Facebook Graph API” tools for collecting data. This tool can extract data from specific Facebook group given by the user. User will only mention the Facebook group, a time range (start date, end date), and number of posts. The Tool will provide the data based on that information. Since we did not use Natural Language Processing (NLP), system cannot convert others language to one common language. For that reason we keep only English language status and discard others status. We did the selection process by ourselves.

5 Challenges and Recommendations

We faced a lot of challenges for this paper. Finding open datasets and other privacy issues are main challenges for us. Sarcasm is also one of the major challenges for us. If sarcasm which is positive will be classified as positive and same for negative is the problem. Another challenge for us is to detect Neutral sentiment. That is ‘How can we detect whether the sentence sentiment is neutral? On the other side sentiment analysis itself faces some technical challenges. Implicit sentiment, spam, context dependency are the general challenges. Those are the big challenges for us.

If we want to solve sarcasm problem, we have to use Natural Language Processing (NLP). Detect a neutral sentiment we use a special technique “Rate of Sentiment”. It defines the rate of positive, negative, neutral sentiment. If we want to find only one answer, then we will compare the sentiment rate of each others.

6 Conclusion

Since sentiment analysis refers to accurately identify, study and quantify subjective information, thus SA becomes mandatory for nowadays for the social network sites to survey responses, healthcare materials, online media etc. However, Sentiment analysis has been perused to find the sentiment of any meaningful sentence. Necessity of sentimental analysis is increasing day by day. Because by analyzing the hidden information we can find the actual information and try to improve many things. Due to the automatic learning capability of deep learning techniques, we can used it for implementing sentiment analysis. Different studies conducted on deep learning depict that’s why deep learning techniques are very successful in sentimental analysis. Therefore, in this contribution, we have implemented the sentiment analysis for text using Deep Learning such as CNN and RNTN. We have proposed different example of text and classify against CNN and RNTN. We just consider the text and do not consider any emotions sign and all the text is in English. Thus, our future contribution associated with this work will propose new machine learning approaches which will be capable of classifying approximately all the available languages. However, various mapping based procedures will be considered for the purpose of pre-processing and avoiding irreverent or houseful data.