{'fraction_non_alphanumeric': 0.0226490306214894, 'fraction_numerical': 0.005647158301624691, 'mean_word_length': 4.845542806707855, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Self-Aware Contextual Behavior Analysis for Service Quality Assurance Over Social Networks

Social media allows people to share their ideology through an efficient channel of communication. The social dialogues carry sentiment in expression regarding a particular social profile, trend, or topic. In this research, the authors have collected real-time user comments and feedback from Twitter portals of two food delivery services. This is followed by the extraction of the most prevalent contexts using natural language analytics. Further, the proposed algorithmic framework is used to generate a signed social network to analyze the product-centric behavioral sentiment. Analysis of sentiment with the fine-grained level about contexts gave a broader view to evaluate and perform contextual predictions. Customer behavior is analyzed, and the outcome is received in terms of positive and negative contexts. The results from the social behavioral model predicted the positive and negative contextual sentiments of customers, which can be further used to help in deciding future strategies and assuring service quality for better customer satisfaction.


INTROdUCTION
The social network is a highly complex and interconnected structure of online communities that offers an interactive platform to exchange ideas and ideologies. The socially interacting networks are regarded as complex not only due to the number of profiles (nodes) and links (edges) but because of the existence of profile-centric features (aspects) and language associated (Ji et. al., 2020;Lu et. al., 2014). Such association requires context-based language analysis to distinguishes the profiles as well as the nature of links connecting those online profiles. For instance, profile name, date, time, posts, etc. are regarded as multiple aspects in the social network. Social network analysis mainly targets the nodes and edges linking in any specific context. It focuses on the type of connection between the nodes and the relationship defining how the nodes are interconnected with each other. We use nodes to identify contexts, however, one may also use contexts to identify nodes. Analyzing the contextual information helps to gain better insights that can be used for measuring, monitoring, and evaluating contents to improve the operability of any organization.
Behavioral analysis, also generally referred to as sentimental analysis, combines the usage of text processing and mining techniques to thoroughly evaluate the subjective mood of users about extracted contexts (Pradhan et. al., 2020;. It represents the process of analyzing people's sentiments or attitudes towards any product, policy, topic, or event. Any shift in the online opinion of people in different contexts directly affects the performance parameters of large-scale social, political, or profit organizations. Behavioral analysis is one of the most buzzed filed in social network analysis. With the increase in social networking sites, e-commerce sites, and online platforms for expressing user opinions like Facebook, Twitter, etc. competition among the products and policy has increased a lot. User satisfaction and user loyalty is the utmost concern of the policy and product makers for assuring the quality of service. Business analysts, customer support personnel, human resource managers, company directors, and other stakeholders make use of sentiment analysis to understand the problems and challenges being presently confronted. User feedback has been taken very seriously for the quality improvement of the product and policy. This could further assist in creating space for designing a wide range of feasible solutions for organizational progress. Behavioral analysis is applied to user feedback, comments, reviews, or any other text message to identify the polarity of the message as positive, negative, or neutral. Such analysis is generically performed on the document level as a whole, thereby resulting in overall polarity which leads to very high sparsity in the result. To improve this problem, our research is focussed on contextual behavioral analysis (Zhao et. al., 2018).
One of the significances of analyzing user sentiment is to perform segregate textual content into smaller parts with polarity. This performs classification of the associated sentiment of text as positive, negative, or neutral. There are several graphical ways of representing the sentimental aspects, of which signed graphs provide richer visualization. A signed network belongs to the network theory that assists in modeling real-world phenomena. A signed edge in the social network graph represents an edge with a positive, negative, or neutral sign. Social networks offer a rich blend of positive and negative connections. This network architecture helps in identifying the pattern of interaction that is only feasible by analyzing the data with finer granularity. In the present day scenario, besides understanding the thought process of people regarding newly launched products, existing policies, etc.; it is equally important to analyze feedbacks for each of the associated features and classify whether the experience is positive, negative, or neutral. Some of the significant terms related to our research are highlighted as follows: • Aspect -For experimentation, aspects are Twitter attributes (features) that are extracted from Twitter using Twitter API analysis is done using these aspects only • Context -These are the words which are most frequently used in the significance of experience, on whose basis the user sentiment from the tweets, could be further evaluated • Behavior -It denotes the sentiment value negative, positive, or neutral value of the tweet chunk respective to the context words • Signed Network -It is an advanced way of representing the signed data which is a mixture of a friendly and antagonistic relationship based on sentiment in the network Signed Social Network is a type of social network where nodes are the entities and the edges form the social connections. Signed means whether the connection is positive and is represented by green, negative edge is represented by red, and neutral is represented by grey.
The context is the most talked-about noun words that are extracted from the tweeted text and user behavior is analyzed concerning the context word, based on which signed network is constructed. A real-time dataset is extracted from Twitter based on profile-based information (i.e. Twitter user handle). It is easier to analyze tweets because they are short in length due to character limitation on Twitter, hence people are inclined to precisely put their views. The words used in tweets are of high sentiment values, rather than posts from any other medium, e.g. Facebook. Our research goal is to propose a generic model that can be used for any purpose (policy, product, campaign, etc.) or profile (e.g. individual, organization, etc.) to capture the temporal dynamics presented in the real-time data.
For instance, Zomato launched ZomatoPremierLeague mostly referred to as ZPL with the Indian Premier League (IPL) matches. People were posting positive tweets in large numbers, thereby making #ZomatoPremierLeague a popular trend on Twitter, which can be used to strategize plans for launching ZomatoCup with World Cup matches.

ReLATed wORK
The literature survey encompasses several research studies from which have inspired towards contributing in a better and effective way. All the shortcomings and benefits of all these papers have collectively led to improvements and innovations made in our proposed work. This survey is a quick summary of the Context-based behavioral analysis using a signed network.
A self-regulating and unsupervised approach is designed for sentiment analysis techniques (M. et al, 2018). The mechanism mainly consists of two essential functions contextual analysis and unsupervised ensemble learning in which sentiment lexicon, SentiWordNet, is employed. Another research had proposed lexicon-based methods for opinion mining includes the identification of sentiment lexicon polarities and predict the overall sentiment of a text by aggregation of scores (Muhammad et. al., 2016). Lexicon based methods are used for labeled data which is hard to obtain if we work on real-time data. This technique reduces the semantic difference between the polarities of terms by lexicon methods and new contextual polarity. Sentiment analysis is the most popular area for text mining and opinion mining as the internet is so extensively used nowadays. A rich overview of different aspect extraction technique and approaches are illustrated in (Rana et. al., 2016). In yet another research, aspect level sentiment analysis has been applied to process fine-grain sentiment information which can be useful for applications in different fields, for business planning, product quality enhancement strategy, etc. This study aims to find concept centric sentiment for aspect level semantics (Schouten et. al, 2016).
Sentiment Analysis of online text is the demand of different organizations. product-based sentiment analysis aware users about the positives and negatives of the product. The authors in (Bahrainian et. al., 2013) introduced a target-oriented hybrid method for sentiment summarization on Twitter with their many other additional functionality and features. In yet another research, sentiment analysis used text evaluation techniques for finding the sentiment using some natural processing approaches (Adarsh et. al., 2018). opinion extraction helps in business development and perceiving the user needs. This study calculates the score of words and classifies them as negative, positive, or neutral. Aspect-based sentiment categorizing method for tweet sentiment classification is proposed in (Lek et. al., 2013). The authors have used aspects, sentiment words, and polarity pairs to evaluate the aspects and improved the classification method. According to research conducted in (Liu, 2012), the sentiment extraction can be formally based on the quadruple s g h t ; ; ; , where s denotes the sentiment, g denotes the target object about which the sentiment is expressed, h denotes the holder (user expressing the sentiment), and t denotes the time at which the sentiment was expressed. In previous studies, most studies focus only on sentiment and the target object s g , .
The target can be a product or policy or entity, or it can be its aspect that can be characteristic of that entity or product or policy. Sentiment analysis has been examined mostly at three levels of categorization. The sentiment is categorized on either the document level, the sentence level, or the entity or aspect level. In sentiment analysis opinion can be stated as judgment or belief not founded on certainty or proof.
In (Leskovec et. al., 2010), the authors have innovated a model for analyzing interconnections among users by identifying triads in static social data, extracted Epinions, Slashdot, Wikipedia. The edge between the users of social media indicate the relations among the users, Links in social media is a blend of positive (friendly) and negative (antagonistic) interconnection. In disparity to most of the research in the area of social networks has fixated mostly on positive links among people, in this paper, we get to know how the interconnection between positive and negative interconnection change the arrangements of social networks. An extension of this research on the signed network analyses social network links to validate social relationships, which could either be positive or negative. By analyzing the links, one can predict the sign of a link with high precision. Social media is a complex connection between negative and positive ties, forming a large and complex structure, which is mostly elusive. Authors in (Teixeira et. al., 2017) have studied the change in the perception of users by considering the behavior of others in the same social network. They have studied how peer influence systems work and to what degree one can balance the social network. Signed Social Network have positive, negative or neutral behavior about any product or policy or individual which evolve with time, user change and grow their social setting which in turn effect sign in the social network (Gross and Blasius, 2008;Weller et. al., 2014).
The research conducted in (Yang et. al., 2007) reveals that the real-world system can be converted into a social signed network with signed links between them that can be either negative or positive. Previous research mainly focussed on positive relations which were not very suitable in the context of the signed network. Hence, the authors introduced an algorithm that studies both the factors, including the sign and density of the connections, which makes it more competitive for both the signed network and the traditional network. The algorithm uses an agent-based heuristic approach that gives optimal solutions and benchmark results in various experiments. Identification of communities in a social signed network using the designed algorithm yielded better speed and clustering techniques. Another research done in the field (Tran et. al., 2018) shows how the trend of online shopping has increased, online reviews play an important role as they help other customers to know about the pros and cons of the product and help the company to know the feedback and improve the product quality or service. It has become a task to summarize the information present in the reviews. In this paper, they introduced a novel system for sentiment summarization. It has two steps, first that use frequency, polarity, and strength of the review aspect and second is to the summarization of the reviews automatically using various artificial intelligence techniques of natural language processing. The system automatically incorporates the new reviews into the system and update it from time to time.
In yet another study (Zhu et. al., 2018) the authors have stated opinion mining through polling in a traditional way for better customer satisfaction along with feedback analysis of products. Studies highlighted the opinion polling without using conventional polling techniques and relied only on customer reviews available in the form of textual feedback. Aspects are extracted from the reviews using the bootstrapping method and then opinion mining is done by breaking the sentence into multiple sentences with a single aspect each and finally using the polling algorithm results are evaluated. The method is applied to unlabelled data and does not need any labeled data for training. The proposed system is not domain-specific or language-specific it can be applied to any product or policy. E-commerce's rapid growth has led to an increase in online purchases day today. While shopping online customer satisfaction is of utmost importance to keep the buyer a regular customer of the vendor. In another recent study (Sangeetha et. al., 2017), authors have used reviews and feedback given by the users about any specific product or policy that is taken as a positive insight to enhance the quality of manufacturing and service. Aspects are extracted and prioritized. The proposed system has four main steps, the first being extracting the aspects, followed by categorizing or grouping the aspects and predicting the score of the sentiment. The final stage performs a ranking of the aspects based on opinion. The importance of the aspect is determined by the aspect ranking score.

PROPOSed MOdeL & deSIGN FRAMewORK
In the following segment, the model assumptions are discussed along with the dataset and its features. It also highlights module descriptions, libraries, and a software application used for the implementation.

data Source
Streaming data is extracted using Twitter API for the Twitter handle of Zomato India i.e. @ZomatoIN and @swiggy_in having 10,000 tweets. Twitter provides various features, also called aspects, which are used for analysis that are extracted from Twitter using Twitter API. For instance -tweet text, date, time, users mentioned, location, followers, screen name, verified status, etc. Only English language tweets are considered for further processing in our model. In the following segment, our proposed strategy and algorithm for the context-based signed network is explained.

Proposed Methodology
Our proposed methodology is designed to build a self-aware computational model for predicting the contextual behaviors of the customers using natural language processing. In the following section, the proposed methodology used for data extraction and data pre-processing is highlighted. Fig. 1 represents data extraction and pre-processing. Twitter is a social networking microblogging website that users use to post and communicate through messages called tweets. The amount of information Twitter has is extremely large and unstructured written in common dialect. Data is extracted from Twitter using the Twitter streaming API. Real-time tweets are streamed from Twitter. For accessing Twitter API, OAuth is used, OAuth provides authorization access to the Twitter API in a simple and standard technique from the web, mobile, and desktop application. Real-time tweets are steamed with the aid of the Twitter streaming API. To fetch data from Twitter, the user should have a Twitter account. To authentication the account, a developer profile is created through which the consumer key and consumer secret and the access key and access token are generated. By using these credentials Twitter API can be accessed to acquire the data. In our model, data can be extracted by using both screen names or hashtags according to the requirement. Tweets retrieved from Twitter contain information in a very unstructured way which is very hard to process as the language used in tweets is mostly very lament. Tweets contain many emojis, special symbols, HTTP links, and many punctuation marks. So, all the emojis, all types of special symbols, all the links, and punctuation marks are removed to clean the tweets so that the further processing of tweets can be done easily. Tweets are then tokenized, which splits the stream of text into meaningful words or elements called tokens. Tokenized tweets' results are further processed stemming that is considered an effective way of reducing all the words with the same origin and in the case of the prefix. The POS tagger states some specific tags for all the words in a sentence (table 1). The processing of data is further performed by using a corpus created by POS tagging.

Algorithm for Context-Based Signed Network Creation
In this section, the proposed algorithm is highlighted, which explains context extraction, chunking of tweets, deriving sentiments, and graphical representation (Algorithm 1). Table 2 illustrates the list of symbols used in the algorithm.
Corpus of data created by the POS tagging is used for three main processes in our model, which are detailed as follows: • Context Extraction In our model, sentiments are derived and evaluated according to the context terms. Most of the context terms in a tweet are nouns, we needed to extract the noun words from tweets, which are further divided into four categories. Table 3 lists all the POS-Tags that are further used for context extraction.
All the context words of the noun category from all the tweets are extracted using Term Frequency-Inverse Document Frequency (TF-IDF), which is a statistical way of calculating the frequency of a word in any document to express its importance. The number of times a word is present in a document, the more is its frequency. It is one of the simplest, efficient, and extensively used term weighting scheme, and is expressed in equation (1).
Here, t refers to the number of terms, d denotes each document in the collection of documents, represented by D . So, after applying TF-IDF we get all the context words in the order of their frequency.
Weight Frequency Inverse Document Frequency (WFIDF): It is a proposed solution to the drawback of using term frequency which is the assumption that the count of the number of appearances  . , otherwise where tf ij is the term normalization of term i, and idf i is the inverse document frequency of term i . All the words of one or two characters are cleaned from the top words and for further processing, we choose the top 50 context words in whose reference we will do the sentiment analysis. Top context word does not include the search screen name or hashtag that is used for fetching the data as that word or phrase will be included in every tweet as all the tweets are extracted in that particular reference only.

• Chunking of Tweets
Chunking is a process of breaking singular bits of data and then grouping them in a particular pattern. By grouping the data, we can improve the measure of data we can recollect. In chunking, we select a subset of the token into a hopefully meaningful chunk. In our model, the main focus is on doing noun phrase chunking. Chunking is applied to the pre-processed data corpus. Each chunk of the data must contain one or more noun words because context words extracted are noun words. We aim to group words in a way all the words related to that context or noun words come in a single chunk so that we can find the sentiment about that context word. In our model, we applied grammar for chunking tweets into meaningful sub-parts, called chunks. For our experimentation, a chunk is expressed as follows: where the symbols a i … are highlighted with relevant description and expression in the following table 4.
The grammar rule state that the chunk may contain optional determiner or possessive pronoun or optional any form of adverb or optional any form of the verb or optional any number of the adjective or optional one or more proper noun or optional one or more singular noun or optional one or more singular proper noun or optional one or more plural proper noun. The above grammar chunks the tweets. After chunking, all the chunks of tweets are stored with the respective tweet id. Sentiment analysis of all the chunks is performed using the Textblob library. Sentiment analysis through Textblob returns a sentiment in the form of (polarity, subjectivity) the polarity lies between the range -1 to 1. The sentiment value of all the chunks is stored with the respective chunks for further processing. Now, the main task is matching context words to the noun words in the tweet chunk. If the context word lies in the tweet chunk then we take the sentiment value of the tweets. Every word of the context words file that contain the top 50 pre-processed context words is matched with all the possible chunks made from all the tweets. If the tweet chunks that contain that specific context word are collected in a file and their respective sentiment value is extracted that was stored concerning the chunk sentiment. The average of all the sentiment scores of all the tweet chunks with the particular context word is computed and we get the overall sentiment score about that context. The same process is repeated with all the context words being extracted.

• Graphical Representation
Representation of data done through graphical techniques to determine the optimal output is called Graphical representation. It is one of the most important and powerful tools used for data interpretation. Graphical representation helps in summarizing characteristics of data adequately and knowledgeably giving us a clear picture at the first glance only. The simplicity of graph theory enables any complex structure to be represented easily with visual interpretation. The graph provides more information about the shape of the distribution, the relation between the different variables and trends. Graphical techniques make it very easy to understand the overall data in every interactive way with due details. After computing the overall sentiment value of the context and the individual value of the chunks, the main task is to represent the outcomes. Data is represented in a graphical form, which produces quality figures such as histogram, bar graph, pie chart scatterplot, etc. depending upon the requirement of the user. Overall sentiment analysis of the data is done by using a pie chart and the context word extracted is shown by using a bar graph. For network visualization, we have used Gephi, an open-source graph, and network analysis software. It can deal with a large amount of data for large networks and provide a variety of functions for representing the graph network in a highly interactive way to deliver the best possible outlook of the data with minimum effort. As we are doing sentiment analysis based on context, therefore we have represented the data in the form of a signed network. Fig. 2 represents the Hierarchical Signed Social Network, Level 0 which is represented by orange nodes is the Twitter handle that is used for extracting data. Data can be fetched by using any handle, screen name, hashtags, or keyword. Level 1 is represented by the blue nodes in the context words extracted from the data. It represents the context that is most talked about. Level 2, represented by the green node, is the tweet ids in which respective context words are found. The edge between the i < NNS> one or more plural proper noun context word and tweet Ids and screen name represents the link between tweet ids and context words and screen names. The color of the edge depends upon the sign on tweet sentiment value. In signed network edges contain the sign according to the sentiment value. The sign edges are not shown by putting signs on the edges but by the color of the edges. If the tweet sentiment value about respective context words is negative then the color of the edge is red from level 2 to level 1. If the tweet sentiment value about respective context words is positive then the color of the edge is green from level 2 to level 1. If the tweet sentiment value about respective context words is neutral then the color of the edge remains grey from level 2 to level 1. If the overall sentiment value of the context word is negative then the color of the edge is red from level 1 to level 0. If the overall sentiment value of the context word is positive then the color of the edge is green from level 1 to level 0. If the overall sentiment value of the context word is neutral then the color of the edge remains grey from level 1 to level 0.

ReSULTS ANALySIS
The Twitter handles used for fetching the live data include @ZomatoIN and @swiggy_in, respectively.

General Sentiment Analysis
The following results show outcomes on applying sentiment analysis on the dataset and then classifying tweets into the positive, negative, or neutral tweet. Fig. 3-4 shows the sentiment analysis for Zomato and Swiggy respectively. It is the process of identifying the user's polarity of positive, negative, or neutral behavior on any given topic. We have used the screen name @ZomatoIN and collected 8,000 latest tweets and @swiggy_in and collected 6000 latest tweets respectively. Sentiment analysis of tweet text is conducted after pre-processing by using the python library Textblob. It shows the sentiment analysis of the tweets based on their chunk sentiment value. The tweet is divided into chunks, whose sentiment analysis is computed individually and the average of the sentiment values of the chunk is evaluated as a new overall sentiment of the tweet.
This provided 26.2% of positive, 49.0% of neutral, and 24.8% of negative tweets for Zomato and 30.3% of positive, 41.8% of neutral, and 27.9% of negative tweets for Swiggy. Fig. 5-6 shows the classification of tweets as per generating sources using which the tweets are posted. These sources

Contextual Analysis
In the following section, the results of the context words are highlighted that are extracted from the dataset for contextual analysis. Fig. 7-8 shows the top context words extracted from the tweets from Zomato and Swiggy respectively. These context words are the most frequent noun words extracted from the dataset. The X-axis shows the words that act as context words and Y-axis denotes the frequency of word occurrence. But these context words contain the screenname or hashtags used for extracting data. It may also contain one or two-letter words that could be noun words but do not necessarily contribute to any context. Hence, such words need to be cleaned. So, such words are cleaned out of the top 50 context words extracted from the dataset. 10 words are dropped in the context pre-processing giving us the top 40 Context words that can be used for further processing.  Fig. 9 -10 represents the network of context words for Zomato and Swiggy. The yellow nodes are the context words and the red node represents the master Twitter handle for which the data is extracted. The edge between the context word and Twitter handle represents the link between Twitter handle and context words.

Context Networks
In the following section, we are representing the results of the social network which contain the context words and tweet ids. Fig. 11-12 represents the network of cleaned context words and the tweet Ids for Swiggy and Zomato respectively.
The yellow nodes are the context words and the blue nodes are the tweet ids. Grey edges between context word and tweet ids represent links. Tweet ids are connected to one or more than one context words depending upon the number of context words present in the tweet. The size of the context word which is represented by the yellow nodes is depending upon the degree of the node. The greater the degree of a node, the greater the size of the node. Labels on context word nodes are shown. It is a simple directed graph in which context nodes are the target and tweet ids are the source.

Signed Social Network
In the following section, the results are highlighted in the form of a signed social network, between the context words and the tweet ids with signed edges. The color of an edge depends upon the sign on tweet sentiment. In the signed network, edges contain the sign according to the sentiment value of the chunk. The positive, negative, and neutral sentiments are highlighted with green, red, and grey edge colors. Fig. 15-16 represents a network graph of top context words using hashtag or screen name. Overall sentiment value for all the context words is computed individually. The yellow nodes are the context words and the red nodes denote the search screenname/hashtag. The positive, negative, and neutral sentiments of the individual context are highlighted with green, red, and grey edge colors respectively.
Tables 5 and 6 provide a prediction of the positive and negative context words which directly indicate the current mood of the customers about the products and services which can aid in decision making and improving strategy using our proposed context-based language analytics.

CONCLUSION
Our research is motivated towards assisting large-scale organizations to perform analysis of user behavior in the form of artificial intelligence-based sentiment mining using natural language processing that could aid in decision making and service quality improvement. For this purpose, we have extracted real-time user comments from the Twitter social network for Zomato and Swiggy food delivery portals. The user experience posted on social media is considered highly genuine, and hence the feedbacks form a sound basis for research. In this paper, we have built a self-aware computational model for context-based sentimental language analysis, visualized through a signed social network. The overall sentiment analysis provides knowledge about an abstract sentiment, while context-based analysis helps us to find the major contexts from a list of topics and the mood associated with each such context. This is achieved using natural language processing, which involved chunking and lemmatization to compute the hidden contexts in user comments over social media. Further, our proposed algorithm is executed to generate the signed social network based on the realtime user experience, and the contents computed. The network data was processed and we found 26.2% of positive, 49.0% of neutral, and 24.8% of negative tweets for Zomato, and 30.3% of positive, 41.8% of neutral, and 27.9% of negative tweets for Swiggy. Moreover, our study revealed 50 contexts from both the food delivery portals, of which 10 contexts were found most relevant. Our proposed work aims at benefitting organizations in understanding their flaws in winning maximum customer satisfaction. Future work in the same field can be extended by adding emoticons to the analysis. We can also check the sentiment of the paragraph by evaluating the emoticons in it. Emoticons used will add up to the sentiment value. Furthermore, the main limitation is the changing jargon used in the day-to-day world of social media where words like lol, FOMO, OOTD, etc. come up every day and we have limitations in our system to study them in terms of their literal meaning.