4

Can we detect the emotions (or feelings) of a human through conversations with an AI?

Something like a "confessional", disregarding human possibilities to lie.

Below, I have the categories joyful, sadness, anger, fear and affection. For each category, there are several words that can be in the texts that refer to it.

  • Joy: ( cheerful, happy, confident, happy, satisfied, excited, interested, dazzled, optimistic, relieved, euphoric, drunk, witty, good )

  • Sadness: ( sad, desperate, displeased, depressed, bored, lonely, hurt, desolate, meditative, defrauded, withdrawn, pitying, concentrated, depressed, melancholic, nostalgic )

  • Anger: ( aggressive, critical, angry, hysterical, envious, grumpy, disappointed, shocked, exasperated, frustrated, arrogant, jealous, agonized, hostile, vengeful )

  • Fear: ( shy, frightened, fearful, horrified, suspicious, disbelieving, embarrassed, embarrassed, shaken, surprised, guilty, anxious, cautious, indecisive, embarrassed, modest )

  • Affection: ( loving, passionate, supportive, malicious, dazzled, glazed, homesick, embarrassed, indifferent, curious, tender, moved, hopeful )

Flow Example

Phrase 1: "I'm very happy! It concludes college."

Categorization 1:  - Joy (+1)

  • Sadness (-1)

Phrase 2: "I'm sad, my mother passed away."

Categorization 2:  - Sadness (+1)

  • Joy (-1)

Phrase 3: "I met a girl, but I was ashamed."

Categorization 3:  - Fear (+1)

Is this a clever way to follow and / or improve, or am I completely out of the way?

I see that there is a Google product that creates parsing according to the phrases. I do not know how it works, because I like to recreate the way I think it would work.

Remembering that this would not be the only way to categorize the phrase. This would be the first phase of the analysis. I can also identify the subject of the sentence, so we would know if the sadness is from the creator of the message or from a third party, in most cases.

nbro
  • 42,615
  • 12
  • 119
  • 217
GIA
  • 568
  • 6
  • 22

3 Answers3

2

I think you are definitely on a very sensible track. No one defines right or wrong in emotion field. It's not hard science. It's all theories.

I have recently read a paper regarding emotions in Reinforcement Learning (RL). It has explained briefly emotion from 3 perspectives: psychology, neuroscience and computer science. In particular, your way of emotion definition matches one of the categorical emotion theory in the psychology perspective. The other theories in psychology perspective and componential emotion. You can try to implement them and try out which one works well. The paper has also introduced ways to measure the level of emotions (emotion elicitation).

Here is the link for the paper I have mentioned. I am sure you will receive lots of inspiration. I have also written a summary of this paper. Take a look if the original paper is too long to read.

I don't have any concrete solution for implementing. But the general idea is always trying to categorize abstract concepts and quantify them. And try some thing, and iteratively modify and improve it. All the best!

Diansheng
  • 121
  • 4
2

I don't want to pour cold water over your approach, but I am very sceptical and (having worked in sentiment analysis myself) think it is way too simplistic.

Various communicative intents are encoded in language, and there is a wide range of linguistic features that are employed for that purpose. Choice of words is only one of them; it is the most obvious one, as we can easily see the words themselves. But words in isolation do not mean anything, context is important. It is of course not difficult to come up with example sentences where the sentiment effect of the words you list is reversed. The easy one being negation: I'm not happy about this. Sure, you can check if there is a not before the word, but what about I would be happy if you stopped making such a noise. -- surely here the current state would be one of unhappiness? If you think about real examples, it suddenly becomes very complicated.

Also, words usually have multiple meanings: This cup is just shy of one litre. I'm sure you'd agree that this does not express 'fear'. And The shunter moved the tender on the old steam engine. is not about affection. But solving this problem involves word sense disambiguation, which in itself is a hard problem to solve.

The problem is, initially word-based approaches look really good and transparent, as you can easily see what's going on. But language unfortunately doesn't play ball, and in real life systems don't tend to work very well. Lexical choice is only one way to encode sentiment, there are also grammatical patterns. But these are often very subtle, and not yet well-explored in linguistic research.

To end on a positive note, have a look at research in evaluation (which is kind of related to sentiment). For example, Susan Hunston's Corpus Approaches to Evaluation, (Routledge 2011). That should give you some further pointers.

Oliver Mason
  • 5,477
  • 14
  • 32
1

It could work using supervised learning , as long as you have the required dataset.

However, a low error ratio using unsupervised learning of the human emotion spectrum would prove to be more difficult.

Ex : How would you defined being in love to a neural network ? Joy +1 , Sadness -1 ?

Now , How would you define being in love with , let’s say, someone you know you could never be with ? Joy -1 , Sadness +1, but at the same time , the only fact that you are thinking about that person bring a Joy +1 .

Human emotions are quite complex . A good start (in my humble opinion) would be to read about ‘emotion-related’ hormones , and how they affect the brain ( dopamine , serotonin, etc).

Some emotions are really a precise mix of these hormones , probably giving you a good hint on how to ‘caregorize’ your network.