Method and system for automated sentiment classification
A system includes an input interface receiving conversation input from at least one system participant. A natural language processor operates on the conversational input. A sentiment processor operates on the pre-processed input using a sentiment classification model to predict sentiment, the sentiment processor predicting positive, neutral, and negative sentiment for the pre-processed input. An emotion processor receiving the pre-processed input from the natural language processor and a corresponding sentiment from the sentiment processor and operates to predict an emotion class and a strength of the emotion based on the corresponding sentiment. An output mechanism generates sentiment strength for the conversation input based on the emotion class and strength of the emotion.
1 . A system comprising:
an input interface receiving conversational input from at least one system participant;
a natural language processor operating on the conversational input to produce pre-processed input;
a sentiment processor operating on the pre-processed input using a sentiment classification model to predict sentiment, the sentiment processor predicting positive, neutral, and negative sentiment for the pre-processed input and sending the corresponding predicted sentiment to an emotion processor;
the emotion processor receiving the pre-processed input from the natural language processor and the corresponding predicted sentiment from the sentiment processor, the emotion processor operating on the pre-processed input to predict an emotion class selected from an emotion class group comprising anger, fear, sadness, and joy and a strength of the emotion based on the corresponding predicted sentiment received from the sentiment processor, wherein:
on a condition that the predicted sentiment is positive, transmitting the predicted sentiment and the pre-processed input to a positive emotion trained model, the positive emotion trained model predicting a positive emotion as the emotion class and predicting a strength of the positive emotion based on the positive predicted sentiment and the pre-processed input; and
on a condition that the predicted sentiment is negative, transmitting the predicted sentiment and the pre-processed input to a negative emotion trained model, the negative emotion trained model predicting a negative emotion as the emotion class and predicting a strength of the negative emotion based on the negative predicted sentiment and the pre-processed input; and
an output mechanism generating sentiment strength for the conversational input based on the emotion class and strength of the emotion.
2 . The system of claim 1 , wherein the emotion processor outputs an emotion strength of zero when the corresponding predicted sentiment is neutral.
3 . The system of claim 1 , wherein the natural language processor groups the conversational input into utterances and provides the pre-processed input to the sentiment processor and the emotion processor grouped into separate utterances.
4 . The system of claim 3 , wherein each utterance is at least one word and has a maximum length.
5 . The system of claim 4 , wherein the natural language processor divides the utterance into multiple sentences when the utterance exceeds the maximum length.
6 . The system of claim 1 , wherein the emotion processor evaluates multiple classes of emotions.
7 . The system of claim 1 , wherein the output mechanism generates sentiment strength for multiple utterances through a dialog in order to dynamically generate a representation of the sentiment strength throughout the dialog.
8 . The system of claim 1 , wherein the sentiment classification model utilizes a deep learning architecture.
9 . A method comprising:
receiving conversational input at an input interface from at least one system participant;
operating on the conversational input using a natural language processor to produce pre-processed input;
predicting sentiment using a sentiment processor operating on the pre-processed input, the sentiment processor using a sentiment classification model for predicting positive, neutral, and negative sentiment for the pre-processed input and sending a corresponding predicted sentiment to an emotion processor;
predicting an emotion and a strength of the emotion of the pre-processed input received from the natural language processor using the emotion processor receiving the pre-processed input from the natural language processor and the corresponding predicted sentiment from the sentiment processor, the emotion processor operating on the pre-processed input to predict an emotion class selected from an emotion class group comprising anger, fear, sadness, and joy, the emotion processor utilizing a positive emotion trained model when the corresponding predicted sentiment is positive, the positive emotion trained model predicting a positive emotion a strength of the positive emotion and the emotion processor utilizing a negative emotion trained model when the corresponding predicted sentiment is negative, the negative emotion trained model predicting a negative emotion and a strength of the negative emotion, wherein the predicted emotion is based on the predicted sentiment and the pre-processed input; and
generating sentiment strength for the conversational input based on the emotion and strength of the emotion.
10 . The method of claim 9 , further comprising outputting a strength of zero when the corresponding predicted sentiment is neutral.
11 . The method of claim 9 , further comprising grouping the conversational input into utterances and providing the pre-processed input to the sentiment processor and the emotion processor grouped into separate utterances.
12 . The method of claim 11 , further comprising providing at least one word in each utterance and setting a maximum length per utterance.
13 . The method of claim 12 , further comprising dividing the utterance into multiple segments when the utterance exceeds the maximum length.
14 . The method of claim 9 , further comprising evaluating multiple classes of emotions.
15 . The method of claim 9 , further comprising dynamically generating a representation of the sentiment strength for each utterance throughout a dialog.
16 . The method of claim 9 , wherein the sentiment classification model utilizes a deep learning architecture.
17 . A non-transitory computer readable medium storing instructions executed by one or more processors to perform operations comprising:
receiving speech input at an input interface from at least one system participant;
operating on the speech input using a natural language processor to produce pre-processed text;
receiving the pre-processed text from the natural language processor at a sentiment processor and an emotion processor;
predicting sentiment using the sentiment processor operating on the pre-processed text, the sentiment processor using a sentiment classification model predicting positive, neutral, and negative sentiment for the pre-processed text;
predicting an emotion and a strength of the emotion of the pre-processed text received from the natural language processor using an emotion processor receiving the pre-processed text from the natural language processor and a corresponding predicted sentiment from the sentiment processor, wherein:
the emotion processor utilizes a positive emotion trained model when the corresponding predicted sentiment is positive, the positive emotion trained model predicting a positive emotion a strength of the positive emotion based on the positive predicted sentiment and the pre-processed text;
the emotion processor utilizes a negative emotion trained model when the corresponding predicted sentiment is negative, the negative emotion trained model predicting a negative emotion and a strength of the negative emotion based on the negative predicted sentiment and the pre-processed text; and
the emotion processor predicts, based on the predicted sentiment, an emotion class selected from an emotion class group comprising anger, fear, sadness, and joy; and
generating sentiment strength for the pre-processed text based on the emotion and strength of the emotion.
18 . The non-transitory computer readable medium of claim 17 , the operations further comprising outputting a strength of zero when the corresponding predicted sentiment is neutral.
19 . The non-transitory computer readable medium of claim 17 , the operations, further comprising grouping the speech input into utterances and providing the pre-processed text to the sentiment processor and the emotion processor grouped into separate utterances.
20 . The non-transitory computer readable medium of claim 19 , the operations further comprising dynamically generating a representation of the sentiment strength for each utterance throughout a dialog.