[BACK]
Computers, Materials & Continua
DOI:10.32604/cmc.2022.021104
images
Article

Personality Detection Using Context Based Emotions in Cognitive Agents

Nouh Sabri Elmitwally1,2, Asma Kanwal3,4, Sagheer Abbas3, Muhammad A. Khan5, Muhammad Adnan Khan6,*, Munir Ahmad3 and Saad Alanazi1

1College of Computer and Information Sciences, Jouf University, Sakaka, 72341, Saudi Arabia
2Department of Computer Science, Faculty of Computers and Artificial Intelligence, Cairo University, 12613, Egypt
3School of Computer Science, National College of Business administration and Economics, Lahore, 54000, Pakistan
4Department of Computer Science, GC University, Lahore, Pakistan
5Riphah School of Computing & Innovation, Faculty of Computing, Riphah International University, Lahore Campus, Lahore, 54000, Pakistan
6Pattern Recognition and Machine Learning Lab, Department of Software, Gachon University, Seongnam, 13120, Korea
*Corresponding Author: Muhammad Adnan Khan. Email: adnan@gachon.ac.kr
Received: 22 June 2021; Accepted: 23 July 2021

Abstract: Detection of personality using emotions is a research domain in artificial intelligence. At present, some agents can keep the human’s profile for interaction and adapts themselves according to their preferences. However, the effective method for interaction is to detect the person’s personality by understanding the emotions and context of the subject. The idea behind adding personality in cognitive agents begins an attempt to maximize adaptability on the basis of behavior. In our daily life, humans socially interact with each other by analyzing the emotions and context of interaction from audio or visual input. This paper presents a conceptual personality model in cognitive agents that can determine personality and behavior based on some text input, using the context subjectivity of the given data and emotions obtained from a particular situation/context. The proposed work consists of Jumbo Chatbot, which can chat with humans. In this social interaction, the chatbot predicts human personality by understanding the emotions and context of interactive humans. Currently, the Jumbo chatbot is using the BFI technique to interact with a human. The accuracy of proposed work varies and improve through getting more experiences of interaction.

Keywords: Emotions; fuzzy; personality detection; contextual analysis; semantic analysis

1  Introduction

Cognitive agents have gained massive popularity over the last few decades. These agents are now being widely incorporated in all kinds of domains [1] from health to industrial/non-industrial, educational, technological to sales/marketing and customer support; these agents can be found doing day jobs almost like their natural counterparts [2]. These agents are designed keeping in mind the psychological behavior and philosophical reasoning of humans. The psychological aspect is taken into account to make the agent ‘feel’ emotional states like a human to aid decision-making and adaptation [3].

Emotions can also be expressed through languages like facial expressions, voice or text. Therefore, emotional Information is a source for extracting meaningful patterns obtained from the given data. These meaningful patterns may include semantics, polarity, syntax, similarities, etc. [4]. This could be achieved through speech recognition, Natural language processing (NLP) or facial expression detection techniques [5]. Tremendous advancements in Artificial intelligence (AI) and Machine Learning (ML) immensely contributed to designing interactive agents.

Interactive cognitive agents employed in Industrial and Non-Industrial organizations provide services such as customer services and feedback management, query analysis and decision making. As of late, scientists in AI and ML are progressively concentrating on creating subjective specialists being able to express and perceive feelings. However, emotions affect regular daily existence and are critical for a few other intellectual capacities, including recognition, getting the hang of, thinking and generally speaking, execution of the operator [6].

Emotion detection most commonly applies techniques from NLP as well as ML [7]. Emotion detection is closely associated with effective computing since it is aimed at improving Human-Computer. In the last few decades, researchers show to focus on developing emotion-based systems. These systems help build Human-computer interaction (HCI) applications in internet search and navigation services, information collection and delivery, interactive chatting systems for customer’s services, customer feedback, analyzing social networking feedback, interactive hardware and software Interfaces. It also includes text processing systems–text summarization, information extraction, information retrieval, domain-specific application websites’ feedback, and text processing applications are typical examples that incorporate cognitive agents [8]. Furthermore, emotion detection is a source through which one can add personality in cognitive agents. The idea behind adding personality in cognitive agents begins an attempt to maximize adaptability based on behavior [9].

Existing subjective specialists are, as of now, ready to, by one means or another, see feelings through outward appearances, signals, discourse and from content [10]. They can add personality traits and emotional intelligence to the cognitive agent. Research is being done, recognising emotions from the text. Several methods have been used, including semantics, keyword spotting, and text mining, to recognize emotions from the text for cognitive agents. However, existing systems are lacking articulating emotional states whenever to detect emotions from context. Many systems may also lack the ability to learn the context of detecting emotions according to the subject. Human in routine social interaction always considers and perceive the emotions of others by addressing the current aim and context of the conversation to judge the personality. This personality perception will help him to change his behavior accordingly. The proposed work is based on the conceptual cognitive model to detect emotions according to context by considering subjectivity for personality detection. The Jumbo chatbot is designed based on this proposed cognitive model to visualize the working form of the proposed work.

2  Related Work

2.1 IBM Watson Personality Insights

The IBM Watson personality insights provide an API to derive insight from different platforms like social media and other digital communications. For example, this service detects an individual’s personality from emails, Twitter posts, simple messages [11].

A Watson personality insight is a combination of three primary models:

(1)   Big Five personality characteristics are used to infer the behavior of an individual.

(2)   Values relate to how an individual’s motivating factors influence decisions like cooperation, achievement striving, efficiency.

(3)   Needs determine an individual’s characteristics based on the current context/situation.

The limitation of this system is that it is assessing the personality based on social media comments, not through live chat. In addition, this system has some contextual limitations for Arabic and Korean inputs

2.2 Nazi Chatbot

A chatbot related to personality adds the extension in dialogue architecture and adds personality traits and emotional intelligence [12,13]. It covers three main areas:

(1)   Understanding of emotions

(2)   Situation management

(3)   Generate emotional response

This system, in some responses, generates offensive tweets, which are not acceptable for a human-based society.

2.3 Personality Forge Chatbots

This chatbot has the ability to build relationships in terms of emotional responses with anyone they chat with. Developers used to integrate it with their chatbot API [14]. The main feature is that it is having knowledge of hundreds or even thousands of words, capable of unmatched pattern matching, having Wikipedia as a knowledge base size. However, this system does not have an emotion analyzer to judge the personality of a human.

The major limitation of all defined related work is that although some judge personality based on emotions and context, they cannot judge personality based on subjectivity.

3  Methodology

3.1 Conceptual Personality Model (CPM)

The proposed system in Fig. 1 is focusing on textual input, and the primary aim is to determine personality based on context and emotions extracted from text input; and finally, it will identify a personality trait

images

Figure 1: Conceptual personality model (CPM)

It simulates a chat application program to detect the emotion using the context. It is employed here the detection technique to detect emotions from a given input and incorporate it into a cognitive agent. The cognitive agent aims to detect a user’s personality from interaction and adapts itself by introducing a personality trait according to the user’s preferences.

3.2 Jumbo Chat Bot

Chat application created to go about as an interface amongst clients and framework for identity identification. This chat application will contribute to the type of English sentences and forward to a pre-relevant analyzer for additional handling.

3.2.1 Pre-Context Analyzer

A pre-contextual analyzer combines two sub-modules, Text Tokenization and Part-of-speech (POS) tagger modules.

3.2.2 Text Tokenizer

The working of the tokenizer is to separate sentences of English and then further grouped these sentences in tokens, which may likewise call “words”. The framework utilizes Stanford NLP gather Tokenizer and POS tagger for the pre-relevant handling of content contribution through visit application by the client as English sentences. Stanford NLP group is a team that provides innovative probabilistic and ML approaches to NLP. They provide state of an art tokenizer and POS tagger. For example, “I am going to visit the USA for enjoying vacations" is input through a chat application. The Stanford Tokenizer will divide this sentence into tokens, as shown in Fig. 2.

images

Figure 2: Text tokenizer

The Stanford Tokenizer divides the text input through the chat application into tokens, and then the Stanford POS tagger activated for tagging process.

3.2.3 POS Tagger

POS tagger is a product that contributes to the type of content and doles out the grammatical form to every token or word, for example, verb, thing and modifier. Although Stanford POS Tagger is a java-based tagger bolster English, German, Arabic, Chinese, French dialects as in Fig. 3, Context Analyzer uses tagged tokens for further processing of text to articulate context-based personality as well as emotion-based personality and personality trait.

images

Figure 3: Pre-context analyzer

3.2.4 Context Analyzer

Context Analyzer performs three critical errands. First, right off the bat, the analyzer extricates the feelings and set of given info utilizing enthusiastic notion analyzer, secondly, working history generator module. Finally, the third analyzer separates conceivable characteristics.

3.2.5 Emotional Sentiment Analyzer

Enthusiastic Suppositions add significance to our day-by-day correspondence, whether it’s verbal or non-verbal. On the off chance that catches the client’s enthusiastic notions electrically, the client's mindset will pass on supposition. If the listener listens to the customer’s voice, it will convey complaints, suggestions about our brand and uncover sales opportunities. Similarly, emotional sentences play an extensive part in all fields of life to judge assessment, inclination, and feelings of other individuals whether passed on through content or voice. Passionate Sentiment Analysis from the content is essential for the intuitive condition and causes us to include knowledge as an emotional sentiment analyst into our intellectual specialist. Enthusiastic Sentiment analyzer will extricate subjectivity and objectivity from content information as defined in Fig. 4.

images

Figure 4: Emotional sentiment analyzer

Text may be subjective or objective. Sometimes refers objective text refers to be neutral. The emotional Sentiment Analyzer module will extract the subjectivity of text input through the chat application. For this reason, the analyzer will extract subjectivity (positive, negative, neutral) of tagged tokens (words) in the form of negative or positive weight from the available lexicon SENTIWORDNET.

3.2.6 Sentiwordnet Lexicon

Sentiwordnet is a lexical hotspot for supporting passionate feeling characterization. It consequently clarifies synsets as per the idea of subjectivity (Positive, Negative) and objectivity (Neutral). Subjectivity score implies (Positive, Negative) and objectivity score (Neutral) is assembled with every synset of sentiwordnet. These scores demonstrate how positive, negative and impartial enthusiastic assessments sorted out in every synset (sense). When Emotional Sentiment Analyzer removes positive or negative or nonpartisan score from Sentiwordnet, it changes into Context Analyzer for additionally handling.

3.2.7 History Generator

The part of history generator is critical for passionate feeling investigation and in addition for recognizing the identity of setting and feelings. The history generator is in charge of investigating the setting of the sentence. Stanford POS tagger labeled the sentence token and in the initial step performed by setting analyzer extricates subjectivity score as affirmative or undesirable from sentiwordnet. The following stage includes the utilization of a history generator. History generator looks through each labeled name which holds symbolic (word) with its POS tag from history reactions store. On the off chance that matches don’t locate the symbolic (word) with its POS tag and partiality score, it refers to putting away to history reactions store. If matches found in the store, the same qualities separated from the store and send to a setting analyzer for the additional process.

3.2.8 Context-Based Personality

The role of context is essential when it is a matter to talk about personality. Personality based on context manifests itself in facial expressions, speech utterances, gestures or actions. For instance, a person’s personality can be reserved, friendly, and imaginative, saying that living in fantasies. So to extract such types of situations from text input is the working of this module. Parameters calculated by the context analyzer are social able, straight forwardness, thorough, tense, imaginative, and forceful, as defined in Tab. 1.

images

In Fig. 5, Y represents the input type of Context Type variables which could be one of the following Y Type-1 context types, and their effect of personality is represented in the graph with the value of X.

μN(Y)(X)={1,0x2550x25,25x500,50x100

μN(Y)(X)={0,x25x2525,25x5075x25,50x750,75x100

μP(Y)(X)={0,0x50x5025,50x751,75x100

images

Figure 5: Impact of type-1 context on personality

In Fig. 6, Z represents the input type of Context Type variables which could be one of the following Z Є Type-2 context types.

μP(Z)(W)={1,0w2550w25,25w500,50w100

μN(Z)(W)={0,w25w2525,25w5075w25,50w750,75w100

μN(Z)(W)={0,0w50w5025,50w751,75w100

images

Figure 6: Impact of second type-2 of context on personality

3.2.9 Emotion-Based Personality

Human emotions manifest themselves in facial expressions, speech utterances, writings, and gestures and actions. Consequently, scientific research in emotion has been pursued along several dimensions and has drawn upon research from various fields. Recent research has shown that emotions play an essential role in our life. Emotions are described from a different perspective. Some researchers think feelings are also developed; others think emotions are publically built. As indicated by PAUL EKMAN, there are Big Six feelings that can be sorted into essential feelings. These Big Six reactions are Happiness, surprise, fear, sadness, disgust, and anger. Emotion-based personality adds position to our regular message, whether it's vocal or non-vocal. Feeling-based identity from the content is significant for the intuitive condition and causes us to include knowledge as identity into our intellectual operator. Feeling-based identity rates passionate human states as per positive or negative, and neutral extremity. So this module will extract emotions from text input and gives result in percentage.

The following Tab. 2 define the Emotions use in the proposed model, their categorization and scaling.

images

In Fig. 7, V represents the input type of emotion type variables, one of the following V Є Type-1 emotions.

μN(V)(U)={1,0u2550u25,25u500,50u100

μN(V)(U)={0,u25u2525,25u5075u25,50u750,75u100

μP(V)(U)={0,0u50u5025,50u751,75u100

images

Figure 7: Impact of type-1 emotion on personality

In Fig. 8, T represents the input type of Emotion Type variables which could be one of the following T Є Type-2 Emotions.

μP(T)(S)={1,0s2550s25,25s500,50s100

μN(T)(S)={0,s25s2525,25s5075s25,50s750,75s100

μN(T)(S)={0,0s50s5025,50s751,75s100

3.2.10 Personality Detection

After extracting emotions and context from a given input, a personality will be detected in terms of positive, negative or neutral. Identity discovery assumes an extensive part in all fields of life to judge feelings, mindsets, feelings, and settings through content or voice. Identity identification from the content is significant for the intuitive condition and encourages us to include insight into our psychological operator.

images

Figure 8: Impact of type-2 emotion on personality

3.2.11 Personality Trait

When personality is detected in positive, negative or neutral, the next thing that has a significant role in identifying traits based on context-based personality and emotion-based personality is that an agent is considered useless if there is no personality. For this purpose, some designers have developed traits, using the term “Big Five” personality traits. They arrived from five-factor models, which are used often by many psychologists so to determine human personality. Five traits included in every human's personality are agreeableness, conscientiousness, neuroticism, extraversion, and openness, defined in Tab. 3. On behalf of these five traits, the proposed system will detect traits for every personality.

images

In Fig. 9, Where L represents the input type of personality trait variables could be one of the following K Є Type-2 personality traits.

μP(L)(K)={1,0k2550k25,25k500,50k100

μN(L)(K)={0,k25k2525,25k5075k25,50k750,75k100

μN(L)(K)={0,0k50k5025,50k751,75k100

In Fig. 10, R represents the input type of Personality Trait variables which could be one of the following R Є Type-1 personality trait

μN(R)(Q)={1,0q2550q25,25q500,50q100

μN(R)(Q)={0,q25q2525,25q5075q25,50q750,75q100

μP(R)(Q)={0,0q50q5025,50q751,75q100

images

Figure 9: Impact of type-2 personality trait on personality

images

Figure 10: Impact of type-1 personality trait on personality

3.2.12 Experimental Results

A sample of data questions based on Big five inventory (BFI) used by many psychologists to determine the personality of a human. The proposed approach will take some questions and detect personality based on those questions.

4  Results

After answering the questions, the system will get the result in percentages. Ekman’s theory based on six emotions is used in this application. In the end, the application will determine positive, negative, and neutral personalities based on emotions and context-based traits.

Fig. 11a and 11b define the experimental results of one experiment. This result might not be accurate because on answering more questions, the accuracy of the result will increases.

images

Figure 11: (a) Result of experiment 1 (b) Result of experiment 1

5  Discussions

Emotions can be expressed through languages like facial expressions, voice or text. Emotional information requires the extraction of meaningful patterns from the given data. Emotion detection is a source through which one can add personality in cognitive agents. The idea behind adding personality in cognitive agents begins an attempt to maximize adaptability on the basis of behavior. Emotions and their detectability play a crucial role in an interaction. If one could detect the emotion and its type during an interaction, there is a probability that one can derive an impression about the personality from this emotion. Chatbots such as Nazi, Personality Forge and IBM Watson personality insights determine personality based on emotions, generate an emotional response, and cover the area of situation management. Still, the main primary deficiency in these three chatbots is that they do not detect personality on the basis ofbased on subjectivity; instead, it only detects the personality in terms of personality traits and emotional response. Jumbo chatbot presented in this research adds an extra feature of detecting personality based on subjectivity by determining the context-based personality and emotion-based personality based on text input. The interacting body will ask a series of questions, and answers will be given in the form of yes/no. The accuracy level achieved by the jumbo chatbot is 80% as it extends the feature of adding subjectivity to detect personality. This extra feature enhances the featured response of this jumbo chatbot.

6  Conclusion

This research paper attempts to generate cognitive agents that can determine personality and behavior based on some text input, using the context of the given data and emotions obtained from it. If one could detect the emotion and its type during an interaction, there is a probability that one can derive an impression about the personality from this emotion. Humans can perceive emotions as well as can judge personality. The subjectivity in personality can help out to analyze the person's personality and adapt/improve their behavior based on the subject's personality. The proposed model articulates by first extracting emotions and context from a given input, then it extracts subjectivity and identifies traits based on human personality. So, the real impediment in the proposed model might be the disappointment of judgment of emotions and setting from content through which identity location is come about in some way or another not precise. This issue can be accomplished and considered in future work.

Funding Statement: The authors received no specific funding for this study.

Conflicts of Interest: The authors declare that they have no conflicts of interest to report regarding the present study.

References

  1. C. Hung and S. J. Chen, “Word sense disambiguation based sentiment lexicons for sentiment classification,” Knowledge-Based Systems, vol. 110, no. 3, pp. 224–232, 2016.
  2. S. C. Herpertz and K. Bertsch, “The social-cognitive basis of personality disorders,” Current Opinion of Psychiatry, vol. 27, no. 1, pp. 73–77, 2014.
  3. E. L. MacLean, “Unraveling the evolution of uniquely human cognition,” National Academy of Sciences of the United States of America, vol. 113, no. 23, pp. 6348–6354, 2016.
  4. G. Tamulevicius, G. Korvel, A. B. Yayak, P. Treigys, J. Bernataviciene et al., “A study of cross-linguistic speech emotion recognition based on 2D feature spaces,” Electronics, vol. 9, no. 10, pp. 1–17, 2020.
  5. T. Davenport and R. Ronanki, “The rise of cognitive agents,” Retrieved from deloitte insights, 2010. [Online]. Available: https://www2.deloitte.com/us/en/insights/focus/cognitive-technologies/rise-of-cognitive-agents-artificial-intelligence-applications.html,.
  6. M. Dehghani, M. H. I. Yang, J. Graham, S. Marsella, K. Forbus et al., Computational Models of Moral Perception, Conflict and Elevation. Mexico: International Association for Computing and Philosophy, pp. 1– 15, 2012.
  7. U. Arbieu, K. Helsper, M. Dadvar, T. Mueller and A. Niamir, “Natural language processing as a tool to evaluate emotions in conservation conflicts,” Biological Conservation, vol. 256, pp. 1–20, 2021.
  8. M. Naiz, “How to create a naiz personality for your chatbots,” Retrieved from naiz.chat, 2012. [Online]. Available: https://medium.com/naiz-chat/how-to-create-a-naiz-personality-for-your-chatbots-7ba16c453256,.
  9. E. Oliveira and L. Sarmento, “Emotional advantage for adaptability and autonomy,” in Int. Joint Conf. on Autonomous Agents and Multiagent Systems, USA, pp. 305–312, 2013.
  10. IBM Watson Personality Insights, 2021. [Online]. Available: https://personality-insights-demo.ng.bluemix.net.
  11. S. N. Shivhare and S. Khethawat, “Emotion detection from text,” Data Mining and Knowledge Management Process, vol. 4, no. 6, pp. 1–8, 2012.
  12. F. A. Acheampong, C. Wenyu and H. N. Mensah, “Text-based emotion detection: Advances, challenges, and opportunities,” Engineering Reports, vol. 2, no. 7, pp. 1–24, 2020.
  13. S. Shaheen, W. E. Hajj, H. Hajj and S. Elbassuoni, “Emotion recognition from text based on automatically generated rules,” in IEEE Int. Conf. on Data Mining Workshop, Shenzhen, China, pp. 11–16, 2014.
  14. J. Tao, “Context based emotion detection from text input,” in 8th Int. Conf. on Spoken Language Processing, Bangkok, pp. 14–19, 2012.
images This work is licensed under a Creative Commons Attribution 4.0 International License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.