4
$\begingroup$

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.

$\endgroup$
7
  • 1
    $\begingroup$ I think a big problem with algorithms and NLP is not just context, but subtext. The meaning is not always the literal meaning, and simple statements can often have layers of meaning. Regardless, I think your endeavor is worthwhile, even if it doesn't produce strong results initially. This seems like a problem that will have to be "chipped away" over many iterations. $\endgroup$
    – DukeZhou
    Apr 4, 2018 at 21:43
  • 1
    $\begingroup$ Thank you. I found a library in Python that does a similar form (by words). But it takes human labor to add words and their values. $\endgroup$
    – GIA
    Apr 5, 2018 at 18:54
  • 1
    $\begingroup$ There are a number of papers on facial recognition techniques (and other biometrics) to gauge emotion. As a former poet and dramatist, I can tell you that's a much less complex approach than trying to intuit the meaning of subtle text (which might turn out to require something akin to AGI--many humans seem not to get subtext!) But if you can correlate facial expression with text or spoken language, it would probably be fairly accurate in determining if the literal meaning is correct, or if sarcasm or irony is involved. $\endgroup$
    – DukeZhou
    Apr 5, 2018 at 19:01
  • $\begingroup$ "I'm so happy because today I've found my friends" is a great, simple example of the underlying problem. Without the melody, the interpretation is in opposition to what was almost certainly intended. $\endgroup$
    – DukeZhou
    Apr 5, 2018 at 19:04
  • $\begingroup$ Makes sense. Maybe the text or video is not enough for a precise value, but the two together improve accuracy. Thank you. $\endgroup$
    – GIA
    Apr 5, 2018 at 19:04

3 Answers 3

2
$\begingroup$

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!

$\endgroup$
1
  • $\begingroup$ Thanks for the material. I fully agree. Therefore, I believe that the best way to obtain real and useful data for this type of analysis needs to come from communities, polls, etc. Something like, "What does this word mean to you?" That is, a long and laborious search. Remembering that the search results vary from culture, parents, needs, etc. $\endgroup$
    – GIA
    Apr 5, 2018 at 19:02
2
$\begingroup$

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.

$\endgroup$
1
  • 1
    $\begingroup$ I fully understand what you're saying and agree. I'm not saying that the way I explained here is correct. I am looking for new logics, for new steps. For example, in your sentence: "I would be happy if you stopped making such a noise.". The "If you" turns the sentence into a condition. I can create scoring rules for conditions. As a programmer, I can turn logic into an algorithm. the point is, I am here trying to raise this issue because I believe there are millions of logics to be implemented in this basic that I created. I thank you for your participation, I'll study your directions! $\endgroup$
    – GIA
    Apr 18, 2018 at 17:10
1
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ Yes. Maybe with an operation screen. But the idea is to be unsupervised. $\endgroup$
    – GIA
    Apr 5, 2018 at 18:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .