Indicating sentiment of users participating in a chat session

A sentiment analysis of a chat session in which a plurality of chat messages are posted is performed. Based on the sentiment analysis, at least one emotive model is derived for the chat session. A sentiment of users in the chat session can be determined using the emotive model. A user composing a new chat message for the chat session can be monitored. Based on the monitoring, an impact on the sentiment of the users in the chat session by the new chat message can be determined. A client device can be initiated to display the impact on the sentiment of the users in the chat session by the new chat message before the new chat message is posted in the chat session.

BACKGROUND

The present invention relates to data processing systems, and more specifically, to data processing systems used for real time communication.

In today's electronic world, people oftentimes communicate using text-based messaging. Text-based messaging is a form of real time communication between two or more users in which the users compose text-based electronic messages, typically consisting of alphabetic and/or numeric characters, and communicate the composed messages to one or more other users. The use of text-based messaging has grown over the past decade due to its convenience. For example, rather than participating in an online telephonic or video conference, users can participate in a chat session to communicate with other users. This allows users greater flexibility to multitask while still communicating with the other users.

SUMMARY

A method includes performing a sentiment analysis of a chat session in which a plurality of chat messages are posted. The method also can include, based on the sentiment analysis, deriving, using a processor, at least one emotive model for the chat session. The method also can include determining, using the emotive model, a sentiment of users in the chat session. The method also can include monitoring a first of the users composing a new chat message for the chat session. The method also can include, based on the monitoring the first user composing the new chat message for the chat session, determining an impact on the sentiment of the users in the chat session by the new chat message. The method also can include initiating a client device to display the impact on the sentiment of the users in the chat session by the new chat message before the new message is posted in the chat session.

A system includes a processor programmed to initiate executable operations. The executable operations include performing a sentiment analysis of a chat session in which a plurality of chat messages are posted. The executable operations also can include, based on the sentiment analysis, deriving at least one emotive model for the chat session. The executable operations also can include determining, using the emotive model, a sentiment of users in the chat session. The executable operations also can include monitoring a first of the users composing a new chat message for the chat session. The executable operations also can include, based on the monitoring the first user composing the new chat message for the chat session, determining an impact on the sentiment of the users in the chat session by the new chat message. The executable operations also can include initiating a client device to display the impact on the sentiment of the users in the chat session by the new chat message before the new message is posted in the chat session.

A computer program product includes a computer readable storage medium having program code stored thereon. The program code is executable by a data processing system to initiate operations. The operations include performing a sentiment analysis of a chat session in which a plurality of chat messages are posted. The operations also can include, based on the sentiment analysis, deriving at least one emotive model for the chat session. The operations also can include determining, using the emotive model, a sentiment of users in the chat session. The operations also can include monitoring a first of the users composing a new chat message for the chat session. The operations also can include, based on the monitoring the first user composing the new chat message for the chat session, determining an impact on the sentiment of the users in the chat session by the new chat message. The operations also can include initiating a client device to display the impact on the sentiment of the users in the chat session by the new chat message before the new message is posted in the chat session.

DETAILED DESCRIPTION

This disclosure relates to data processing systems, and more specifically, to data processing systems used for real time communication. In accordance with the inventive arrangements disclosed herein, an emotive analysis can be conducted on chat messages posted in a chat session. Emotive models can be derived based on the emotive analysis. Using at least one emotive model, an emotive impact of a new chat message can be determined prior to the chat message being posted in the chat session. Information pertaining to the emotive impact can be presented to the user who is composing the chat message. Accordingly, the user can review the information and revise the chat message before posting the chat message. Further, the emotive models can be used to determine various other sentiments expressed in the chat session, and the various sentiments can be indicated to the users via user interfaces being used by the users to participate in the chat session.

Several definitions that apply throughout this document now will be presented.

As defined herein, the term “social collaboration system” means a data processing system that hosts at least one social collaboration application.

As defined herein, the term “text-based messaging” means a real time communication of text between two or more users over at least one communication network, wherein the users enter the text into a message using a keyboard, a virtual keyboard (e.g., an on-screen keyboard), a keypad and/or by providing spoken utterances that are converted to text using speech recognition.

As defined herein, the term “message” means an electronic message comprising text that is communized using text-based messaging.

As defined herein, the term “chat session” means a form of text-based electronic messaging in which a plurality of users compose messages on client devices, and the messages are posted to a social collaboration system in a thread for sharing with other users participating in and/or subscribing to the thread. Users view messages in the social collaboration system, for example by accessing the social collaboration system using client devices.

As defined herein, the term “chat message” means a message composed for posting in a chat session.

As defined herein, the term “emotive model” means a data structure configured to determine a sentiment of users toward chat messages posted in a chat session.

As defined herein, the term “quintic emotive model” means an emotive model derived using a quintic function.

As defined herein, the term “quintic function” means a function in the following form:
g(x)−ax5+bx4+cx3+dx2+ex+f
where a, b, c, d, e and f are members of a field, typically the rational numbers, the real numbers or the complex numbers, and a is nonzero.

As defined herein, the term “emotive score” means at least one value indicating a predicted impact of a chat message on sentiment of users participating in a chat session.

As defined herein, the term “responsive to” means responding or reacting readily to an action or event. Thus, if a second action is performed “responsive to” a first action, there is a causal relationship between an occurrence of the first action and an occurrence of the second action, and the term “responsive to” indicates such causal relationship.

As defined herein, the term “computer readable storage medium” means a storage medium that contains or stores program code for use by or in connection with an instruction execution system, apparatus, or device. As defined herein, a “computer readable storage medium” is not a transitory, propagating signal per se.

As defined herein, the term “data processing system” means one or more hardware systems configured to process data, each hardware system including at least one processor programmed to initiate executable operations and memory.

As defined herein, the term “processor” means at least one hardware circuit (e.g., an integrated circuit) configured to carry out instructions contained in program code. Examples of a processor include, but are not limited to, a central processing unit (CPU), an array processor, a vector processor, a digital signal processor (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA), an application specific integrated circuit (ASIC), programmable logic circuitry, and a controller.

As defined herein, the term “server” means a data processing system configured to share services with one or more other data processing systems.

As defined herein, the term “client device” means a data processing system that requests shared services from a server, and with which a user directly interacts. Examples of a client device include, but are not limited to, a workstation, a desktop computer, a computer terminal, a mobile computer, a laptop computer, a netbook computer, a tablet computer, a smart phone, a personal digital assistant, a smart watch, smart glasses, a gaming device, a set-top box, a smart television and the like. Network infrastructure, such as routers, firewalls, switches, access points and the like, are not client devices as the term “client device” is defined herein.

As defined herein, the term “user” means a person (i.e., a human being).

FIG.1is a block diagram illustrating an example of a social collaboration computing environment (hereinafter “computing environment”)100. The computing environment100can include a social collaboration system110and a plurality of client devices120,122,124,126communicatively linked to the social collaboration system110via at least one communication network130. The communication network130is the medium used to provide communications links between various devices and data processing systems connected together within the computing environment100. The communication network130may include connections, such as wire, wireless communication links, or fiber optic cables. The communication network130can be implemented as, or include, any of a variety of different communication technologies such as a wide area network (WAN), a local area network (LAN), a wireless network, a mobile network, a Virtual Private Network (VPN), the Internet, the Public Switched Telephone Network (PSTN), or similar technologies.

The social collaboration system110can be a data processing system that hosts at least one chat server application140. The social collaboration system also can a chat session sentiment analyzer142, an emotive model engine144, a sentiment impact analyzer146and a user interface controller148. In an arrangement, the chat session sentiment analyzer142, emotive model engine144, sentiment impact analyzer146and user interface controller148can be components of the chat server application140. In another arrangement, one or more of the chat session sentiment analyzer142, emotive model engine144, sentiment impact analyzer146and user interface controller148can be separate components that are communicatively linked to the chat server application140. Moreover, one or more of the components142-148may execute on another data processing system that is communicatively linked to the social collaboration system110.

The chat server application140can host chat sessions in which users150,152,154,156of the client devices120-126participate, for example using chat client applications160,162,164,166communicatively linked to the chat server application140. Via the chat client applications160-166, the users150-156can post chat messages in one or more chat sessions and view chat messages posted in one or more chat sessions. In another arrangement, one or more of the users can participate in one or more chat sessions using web browsers executing on the respective client devices120-126to post and view chat messages. The chat server application140can store each chat message170in a particular format. In illustration, the chat server application140can store each chat message170as a JavaScript Object Notation (JSON) file, and create an association between each JSON file and the chat session, for example by assigning a chat session identifier to the chat session and including that chat session identifier in each JSON file.

The chat session sentiment analyzer142can, in real time as chat messages170are posted in the chat session, analyze sentiments expressed and/or implied by the chat messages170. In illustration, the chat session sentiment analyzer can implement sentiment analysis to analyze each chat message170posted in the chat session and assign one or more sentiment scores to each chat message170. For example, the chat session sentiment analyzer142can specify a plurality of sentiments (e.g., anger, fear, disgust, satisfaction, joy, etc.). For each chat message170, the chat session sentiment analyzer142can assign a score to each of the plurality of specified sentiments. Each score can be a value between 0 and 1, wherein a score of 0 for a sentiment indicates that sentiment is not expressed in a chat message170and a score of 1 indicates that the sentiment is fully expressed by a chat message170(e.g., the only sentiment expressed by the chat message170).

To implement the sentiment analysis, the chat session sentiment analyzer142can implement natural language processing (NLP), semantic analysis and computational linguistics on information contained in the chat messages170, and determine sentiments based on the NLP, semantic analysis and computational linguistics. NLP is a field of computer science, artificial intelligence and linguistics which implements computer processes to facilitate interactions between computer systems and human (natural) languages. NLP enables computers to derive computer-understandable meaning from natural language input. The International Organization for Standardization (ISO) (e.g., ISO/TC37/SC4) publishes standards for NLP. Semantic analysis is the implementation of computer processes to generate computer-understandable representations of natural language expressions. Semantic analysis can be used to construct meaning representations, semantic underspecification, anaphora resolution, presupposition projection and quantifier scope resolution, which are known in the art. Semantic analysis is frequently used with NLP to derive computer-understandable meaning from natural language input. An unstructured information management architecture (UIMA), which is an industry standard for content analytics, may be used by the chat session sentiment analyzer142to implement NLP and semantic analysis. Computational linguistics applies statistical and/or rule-based processing to natural language that may augment semantic analysis, for example using machine learning techniques.

Based on the sentiment analysis performed by the chat session sentiment analyzer142, the emotive model engine144can derive, in real time, one or more emotive models180for the chat session. In illustration, based on the sentiment score assigned to each chat message170, the emotive model engine144can derive an emotive model180for each chat message170. For example, the emotive model engine144can use, as input parameters for generating the emotive model180for a particular chat message170, the sentiment scores assigned to each specified sentiment expressed in that chat message170. Accordingly, the emotive model can express a level of each of the specified sentiments conveyed in that chat message170.

Moreover, the emotive model engine144can derive an emotive model for the overall chat session. For example, the emotive model engine144can determine an average sentiment score or a weighted sum of the sentiment scores assigned to each specified sentiment from among each of the chat messages170in the chat session. The average sentiment score can be a value between 0 and 1. Similarly, the weighted sum of the sentiment scores can be a value between 0 and 1. Thus, the weighting assigned to each individual sentiment score can be based, at least in part, on the number of sentiment scores being summed for that particular sentiment. From the average sentiment score or weighted sum of the sentiment scores, the emotive model engine144can derive the emotive model180for the overall chat session using the average sentiment scores or a weighted sum of the sentiment scores as input parameters for generating the emotive model180. The emotive model engine144can update or re-derive the overall emotive model180each time a new chat message170is posted in the chat session.

Further, in a similar manner, the emotive model engine144can derive an emotive model180for chat messages170posted by each particular user150-156. In illustration, for a particular user150, the emotive model engine144can determine an average sentiment score or a weighted sum of the sentiment scores assigned to each specified sentiment from among each of the chat messages170posted by that user150in the chat session, and use the average sentiment score or a weighted sum of the sentiment scores as input parameters for deriving the emotive model180. From the input parameters, the emotive model engine144can derive the emotive model180for the chat messages170posted by that user150. The emotive model engine144can update or re-derive the overall emotive model180for the chat messages170posted by that user150each time the user150posts a new chat message170in the chat session.

In an aspect of the present arrangements, the emotive model engine144further can determine sentiment scores assigned to chat messages170posted in reply to the chat messages170posted by each user150-156and derive corresponding emotive models180. In illustration, for a particular user150, the emotive model engine144can determine an average sentiment score or a weighted sum of the sentiment scores assigned to each specified sentiment from among each of the chat messages170posted by other users152-156in response to chat messages170posted by the user150in the chat session. The emotive model engine144can use the average sentiment score or weighted sum of the sentiment scores from the chat messages posted by the other users152-156as input parameters that are used to derive an emotive model180reflecting sentiments of the responses to the chat messages170posted by that user150. The emotive model engine144can update or re-derive the overall emotive model180for the chat messages170posted by that user150each time the user150posts a new chat message170in the chat session and each time a chat message170is posted in response to a chat message170posted by the user150.

In view of the foregoing, the various emotive models180derived for the chat session can express sentiments conveyed in the chat messages170in the chat session at various levels, including the overall sentiments expressed in the chat session, sentiments expressed in each individual chat message170, sentiments expressed by chat messages170posted by each user150-156, and sentiments expressed by other users150-156in chat messages170responding to other chat messages170posted by particular users150-156. The emotive model engine144can assign the emotive models180to the chat messages170to which they pertain.

Each input parameter for deriving an emotive model180can represent a particular sentiment and a score assigned to that sentiment. For instance, for an emotive model180being derived for a particular chat message170, the score for each sentiment used by the emotive model engine144to derive the emotive model180can be the score assigned to that sentiment by the chat session analyzer142. For an emotive model180being derived for a plurality of chat messages170, the score for each sentiment used by the emotive model engine144to derive the emotive model180can be an average or weighted sum of the scores assigned to that sentiment by the chat session analyzer142.

To derive each emotive model180, the emotive model engine144can apply a least squares analysis to the scores assigned to the respective sentiments. An example of a suitable least squares analysis is a non-linear least squares analysis, which sometimes may be referred to as a non-ordinary least squares analysis. Non-linear least squares is the form of least squares analysis used to fit a set of m observations into a model that is non-linear. In this regard, the emotive models180can be derived to implement polynomial functions. The order of the polynomial functions can be determined based on the number of specified sentiments being represented in the emotive models180. In illustration, if there are five sentiments that are being analyzed, the polynomial functions can be quintic functions. A quintic function is a function in the following form:
g(x)=ax5+bx4+cx3+dx2+ex+f
where a, b, c, d, e and f are members of a field, typically the rational numbers, the real numbers or the complex numbers, and a is nonzero. If there are fewer sentiments specified, the polynomial functions can have a lower order. If there are more sentiments specified, the polynomial functions can have a higher order. For example, if there are three sentiments specified, the polynomial function can be a cubic function; if there are four sentiments specified, the polynomial function can be a quartic function; if there are six sentiments specified, the polynomial function can be a sextic (or hexic) function; if there are seven sentiments specified, the polynomial function can be a septic function; and so on.

The sentiment impact analyzer146can interface with the user interface controller148to present to the users150-156results of various sentiment analyzes described herein. Moreover, as users150-156compose new chat messages170, the sentiment impact analyzer146can determine an impact of the new chat messages170on the chat session, and interface with the user interface controller148to present to the users150-156information indicating the impact prior to the users150-156actually posting the new chat messages170. The user interface controller148can interface with the chat client applications160-166to present to the users150-156the various information in user interfaces of the chat client applications160-166. This can serve to bring the attention of the users150-156to the actual words they user in the chat messages170and prompt the users150-156to consider revising the chat messages170before posting them.

FIG.2depicts an example of a user interface200in which chat messages170exchanged in a chat session and sentiments expressed in the chat session are presented. In this example, the user interface200is presented to the user150, John Doe, by the chat client application160of the client device120. The user150can select a particular chat message170, for example a chat message210. In response, the sentiment impact analyzer146can execute the emotive model180assigned to that chat message210to generate a sentiment impact table220for that chat message170and initiate the user interface controller148to present the sentiment impact table220in the user interface200. In this regard, the user interface controller148can initiate the client device120to present the sentiment impact table220by communicating to the chat client application160the sentiment impact table220. The sentiment impact table220can indicate each specified sentiment222and, for each sentiment222, a corresponding score224assigned to that sentiment222. It should be noted that the sentiment impact table220need not indicate names of participants in the chat session, places, etc. Further, the sentiment impact table220need not indicate personality types, history of interactions, etc.

The user150also can select his user identifier230. In response, the sentiment impact analyzer146can execute the emotive model180assigned to the chat messages210,240posted by the user150to generate a sentiment impact table for the chat messages210,240and initiate the user interface controller148to present that sentiment impact table in the user interface200. In illustration, the user interface controller148can replace the sentiment impact table220with the new sentiment impact table, present the new sentiment impact table in a different location in the user interface200, or update the sentiment impact table220with new scores224determined by the emotive model180.

Further, the user150can select the chat session, for example by selecting a field or control250in the user interface for the chat session. In response, the chat client application160(e.g., at the behest of the user interface controller148) can present a menu252. From the menu252the user150can select a menu item254assigned to the response sentiments of other users152-156toward the chat messages210,240posted by the user150. In response to the user150selecting the menu item254, the sentiment impact analyzer146can execute the emotive model180assigned to chat messages260,262,264generated by other users152-156in response to chat messages210,240generated by the user150. Based on that emotive model180, the sentiment impact analyzer146can generate a sentiment impact table for the chat messages260,262,264and initiate the user interface controller148to present that sentiment impact table in the user interface200. In illustration, the user interface controller148can replace the sentiment impact table220with the new sentiment impact table, present the new sentiment impact table in a different location in the user interface200, or update the sentiment impact table220with new scores224determined by the emotive model180.

Further, the user150can select from the menu252a menu item256assigned to the overall sentiment of the chat session. In response, the sentiment impact analyzer146can execute the emotive model180assigned to the overall chat session (e.g., assigned to the group of chat messages170, including the chat messages210,240and260-264) to generate a sentiment impact table for the overall chat session and initiate the user interface controller148to present that sentiment impact table in the user interface200. In illustration, the user interface controller148can replace the sentiment impact table220with the new sentiment impact table, present the new sentiment impact table in a different location in the user interface200, or update the sentiment impact table220with new scores224determined by the emotive model180.

FIG.3depicts an example of a composed chat message300and sentiments310expressed in the chat message300. In this example, assume that the user150is composing the new chat message300for the chat session using the user interface200ofFIG.2. While the user composes the chat message300, the user interface controller148can communicate with the chat client application160to monitor, in real time, the text320being composed by the user150in the chat message300. The user interface controller148can communicate, in real time, the text320to the chat session sentiment analyzer142. The chat session sentiment analyzer142can perform NLP, semantic analysis and computational linguistics on the text320to analyze sentiments expressed and/or implied by the chat message300, and generate corresponding sentiment scores for the chat message300. Further, the chat session sentiment analyzer142can identify one or more terms330,332contained in the text320that have a highest level of impact on the sentiment scores.

Based on the sentiment scores of the chat message300, as well as the determined overall sentiment of the chat session previously described, the emotive model engine144, in real time, can generate an emotive model180for the chat message300. In illustration, input parameters used by the emotive model engine144to derive the emotive model180can include an average sentiment score or a weighted sum of the sentiment scores assigned to each specified sentiment from among each of the previously posted chat messages170and the new chat message300. The sentiment impact analyzer146can execute the emotive model180for the chat message300to generate a sentiment impact table340for that chat message300and initiate the user interface controller148to present the sentiment impact table340in the user interface. In this regard, the user interface controller148can initiate the client device120to present the sentiment impact table340by communicating to the chat client application160the sentiment impact table340. The sentiment impact table340can indicate an impact on the sentiment of the chat session by the new chat message300.

Further, the sentiment impact analyzer146can indicate, in the chat message300, the terms330,332contained in the text320that have a highest level of impact on the sentiment scores. For example, the sentiment impact analyzer146can initiate the user interface controller148to initiate the chat client application160to highlight the terms330,332in the chat message. In another arrangement, the terms330,332can be highlighted as the user hovers a cursor over the text320or hovers the cursor over those terms330,332. Accordingly, as the user150composes the text320of the chat message300, the user150can evaluate the scores indicated in the sentiment impact table340and give consideration to terms the user150is entering in the chat message300. As the150adds additional text320and/or changes text320in the chat message300, the above described analyses can be updated in real time to update the emotive model180and update the sentiment impact table340. Accordingly, the user150can update/revise the chat message300to convey the emotional impact desired by the user150.

FIG.4is a flowchart illustrating an example of a method400of indicating a predicted impact of a new chat message on sentiment of users participating in a chat session. The method400can be implemented by the social collaboration system110ofFIG.1. At step402, the social collaboration system110can perform a sentiment analysis of a chat session in which a plurality of chat messages are posted. At step404, the social collaboration system110can, based on the sentiment analysis, derive, using a processor, at least one emotive model for the chat session. At step406, the social collaboration system110can determine, using the emotive model, a sentiment of users in the chat session. At step408, the social collaboration system110can monitor a first of the users composing a new chat message for the chat session. At step410, the social collaboration system110can, based on the monitoring the first user composing the new chat message for the chat session, determine an impact on the sentiment of the users in the chat session by the new chat message. At step412, the social collaboration system110can initiate a client device to display the impact on the sentiment of the users in the chat session by the new chat message before the new message is posted in the chat session.

Using at least one emotive model, the social collaboration system110also can initiate the client device to display the overall sentiments of the plurality of users in the chat session, initiate the client device to display the sentiment of at least a second user in the chat session toward at least one chat message posted by the first user, initiate the client device to display the sentiment of a previous chat message posted in the chat session by the first user and/or initiate the client device to display the sentiment of a plurality of previous chat messages posted in the chat session by the first user.

FIG.5is a block diagram illustrating example architecture for a social collaboration system110. The social collaboration system110can include at least one processor505(e.g., a central processing unit) coupled to memory elements510through a system bus515or other suitable circuitry. As such, the social collaboration system110can store program code within the memory elements510. The processor505can execute the program code accessed from the memory elements510via the system bus515. It should be appreciated that the social collaboration system110can be implemented in the form of any system including a processor and memory that is capable of performing the functions and/or operations described within this specification. For example, the social collaboration system110can be implemented as a server, a plurality of communicatively linked servers, a workstation, a desktop computer, a mobile computer, and so on.

The memory elements510can include one or more physical memory devices such as, for example, local memory520and one or more bulk storage devices525. Local memory520refers to random access memory (RAM) or other non-persistent memory device(s) generally used during actual execution of the program code. The bulk storage device(s)525can be implemented as a hard disk drive (HDD), solid state drive (SSD), or other persistent data storage device. The social collaboration system110also can include one or more cache memories (not shown) that provide temporary storage of at least some program code in order to reduce the number of times program code must be retrieved from the bulk storage device525during execution.

One or more network adapters530also can be coupled to social collaboration system110to enable the social collaboration system110to become coupled to other systems, computer systems, remote printers, and/or remote storage devices through intervening private or public networks. Modems, cable modems, transceivers, and Ethernet cards are examples of different types of network adapters530that can be used with the social collaboration system110.

As pictured inFIG.5, the memory elements510can store the components of the social collaboration system110, namely the chat server application140, the chat session sentiment analyzer142, the emotive model engine144, the sentiment impact analyzer146the user interface controller148, and the emotive models180. Being implemented in the form of executable program code, these components140-148.180of the social collaboration system110can be executed by the social collaboration system110and, as such, can be considered part of the social collaboration system110. Moreover, the components140-148.180are functional data structures that impart functionality when employed as part of the social collaboration system110.

Reference throughout this disclosure to “one embodiment,” “an embodiment,” “one arrangement,” “an arrangement,” “one aspect,” “an aspect,” or similar language means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment described within this disclosure. Thus, appearances of the phrases “one embodiment,” “an embodiment,” “one arrangement,” “an arrangement,” “one aspect,” “an aspect,” and similar language throughout this disclosure may, but do not necessarily, all refer to the same embodiment.