Answers.Body: <p>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.</p>
  
  <p>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: <em>I'm not happy about this.</em> Sure, you can check if there is a <em>not</em> before the word, but what about <em>I would be happy if you stopped making such a noise.</em> -- surely here the current state would be one of unhappiness? If you think about real examples, it suddenly becomes very complicated.</p>
  
  <p>Also, words usually have multiple meanings: <em>This cup is just shy of one litre.</em> I'm sure you'd agree that this does not express 'fear'. And <em>The shunter moved the tender on the old steam engine.</em> is not about affection. But solving this problem involves word sense disambiguation, which in itself is a hard problem to solve.</p>
  
  <p>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.</p>
  
  <p>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 <em>Corpus Approaches to Evaluation</em>,  (Routledge 2011). That should give you some further pointers.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-18T17:10:17.687Z
Answers.Text: 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!
Answers.UserDisplayName: GIA
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-18T09:38:43.747Z
Answers.LastActivityDate: 2018-04-18T09:38:43.747Z
Answers.UserDisplayName: Oliver Mason
Answers.Body: <p>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.  </p>
  
  <p>I have recently read a <a href="https://link.springer.com/article/10.1007/s10994-017-5666-0" rel="nofollow noreferrer">paper</a> regarding emotions in Reinforcement Learning (RL). It has explained briefly emotion from 3 perspectives: <em>psychology, neuroscience</em> and <em>computer science</em>. In particular, your way of emotion definition matches one of the <strong>categorical emotion theory</strong> in the psychology perspective. The other theories in <strong>psychology perspective</strong> and <strong>componential emotion</strong>. 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).</p>
  
  <p>Here is the link for the <a href="https://link.springer.com/article/10.1007/s10994-017-5666-0" rel="nofollow noreferrer">paper</a> I have mentioned. I am sure you will receive lots of inspiration. I have also written a <a href="https://diansheng.github.io/Emotion-in-RL/" rel="nofollow noreferrer">summary</a> of this paper. Take a look if the original paper is too long to read.</p>
  
  <p>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!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-05T19:02:17.057Z
Answers.Text: 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.
Answers.UserDisplayName: GIA
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-04T03:00:10.350Z
Answers.LastActivityDate: 2018-04-04T08:53:07.600Z
Answers.LastEditDate: 2018-04-04T08:53:07.600Z
Answers.UserDisplayName: Diansheng
Answers.Body: <p>It could work using supervised learning , as long as you have the required dataset.</p>
  
  <p>However, a low error ratio using unsupervised learning of the human emotion spectrum would prove to be more difficult.</p>
  
  <p>Ex :
  How would you defined being in love to a neural network ? 
  Joy +1 , Sadness -1 ?</p>
  
  <p>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 .</p>
  
  <p>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).</p>
  
  <p>Some emotions are really a precise mix of these hormones , probably giving you a good hint on how to ‘caregorize’ your network.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-05T18:56:01.647Z
Answers.Text: Yes. Maybe with an operation screen. But the idea is to be unsupervised.
Answers.UserDisplayName: GIA
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-03T21:57:39.997Z
Answers.LastActivityDate: 2018-04-03T21:57:39.997Z
Answers.UserDisplayName: Charles-Ugo Brouillard
Body: <p>Can we detect the emotions (or feelings) of a human through conversations with an AI?</p>
  <p>Something like a &quot;confessional&quot;, disregarding human possibilities to lie.</p>
  <p>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.</p>
  <ul>
  <li><p><strong>Joy:</strong> <strong>(</strong> cheerful, happy, confident, happy, satisfied, excited, interested, dazzled, optimistic, relieved, euphoric, drunk, witty, good <strong>)</strong></p>
  </li>
  <li><p><strong>Sadness:</strong> <strong>(</strong> sad, desperate, displeased, depressed, bored, lonely, hurt, desolate, meditative, defrauded, withdrawn, pitying, concentrated, depressed, melancholic, nostalgic <strong>)</strong></p>
  </li>
  <li><p><strong>Anger:</strong> <strong>(</strong> aggressive, critical, angry, hysterical, envious, grumpy, disappointed, shocked, exasperated, frustrated, arrogant, jealous, agonized, hostile, vengeful <strong>)</strong></p>
  </li>
  <li><p><strong>Fear:</strong> <strong>(</strong> shy, frightened, fearful, horrified, suspicious, disbelieving, embarrassed, embarrassed, shaken, surprised, guilty, anxious, cautious, indecisive, embarrassed, modest <strong>)</strong></p>
  </li>
  <li><p><strong>Affection:</strong> <strong>(</strong> loving, passionate, supportive, malicious, dazzled, glazed, homesick, embarrassed, indifferent, curious, tender, moved, hopeful <strong>)</strong></p>
  </li>
  </ul>
  <p><strong>Flow Example</strong></p>
  <p><strong>Phrase 1:</strong> &quot;I'm very happy! It concludes college.&quot;</p>
  <p><strong>Categorization 1:</strong>
   - Joy <strong>(+1)</strong></p>
  <ul>
  <li>Sadness <strong>(-1)</strong></li>
  </ul>
  <hr />
  <p><strong>Phrase 2:</strong> &quot;I'm sad, my mother passed away.&quot;</p>
  <p><strong>Categorization 2:</strong>
   - Sadness <strong>(+1)</strong></p>
  <ul>
  <li>Joy <strong>(-1)</strong></li>
  </ul>
  <hr />
  <p><strong>Phrase 3:</strong> &quot;I met a girl, but I was ashamed.&quot;</p>
  <p><strong>Categorization 3:</strong>
   - Fear <strong>(+1)</strong></p>
  <p>Is this a clever way to follow and / or improve, or am I completely out of the way?</p>
  <p>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.</p>
  <p>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.</p>
  <ul>
  <li><a href="http://www.nltk.org/book/ch08.html" rel="nofollow noreferrer">NLTK</a></li>
  <li><a href="https://github.com/text-machine-lab/sentimental" rel="nofollow noreferrer">Sentiment Analysis Python Example</a></li>
  </ul>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-04T21:43:28.523Z
Comments.Text: 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.
Comments.UserDisplayName: DukeZhou
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-05T18:54:08.910Z
Comments.Text: 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.
Comments.UserDisplayName: GIA
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-05T19:01:56.940Z
Comments.Text: 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.
Comments.UserDisplayName: DukeZhou
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-05T19:04:48.840Z
Comments.Text: "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.
Comments.UserDisplayName: DukeZhou
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-05T19:04:51.040Z
Comments.Text: Makes sense. Maybe the text or video is not enough for a precise value, but the two together improve accuracy. Thank you.
Comments.UserDisplayName: GIA
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-05T19:07:19.250Z
Comments.Text: Following the example of the repository I added, you can join forces of compound words or single words. In case "happy" with value 3 and "so happy" the value 4 and "so much happy" the maximum value 5.
Comments.UserDisplayName: GIA
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-05T19:09:34.757Z
Comments.Text: Exactly.  Curt Cobain was many things, but happy was not one of them.  :)
Comments.UserDisplayName: DukeZhou
Tags: <natural-language-processing><emotional-intelligence><sentiment-analysis>
Title: Can we detect the emotions (or feelings) of a human through conversations with an AI?
UserDisplayName: GIA
ThreadText: # Can we detect the emotions (or feelings) of a human through conversations with an AI?
  
  (Asked by: username_0 on 2018-04-03)
  
  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.
  
  * [NLTK](http://www.nltk.org/book/ch08.html)
  * [Sentiment Analysis Python Example](https://github.com/text-machine-lab/sentimental)
  
  **Tags:** natural-language-processing, emotional-intelligence, sentiment-analysis
  
  > **Comments:**
  > **username_1**: 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.  
  > **username_0**: 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.  
  > **username_1**: 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.  
  > **username_1**: "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.  
  > **username_0**: Makes sense. Maybe the text or video is not enough for a precise value, but the two together improve accuracy. Thank you.  
  > **username_0**: Following the example of the repository I added, you can join forces of compound words or single words. In case "happy" with value 3 and "so happy" the value 4 and "so much happy" the maximum value 5.  
  > **username_1**: Exactly.  Curt Cobain was many things, but happy was not one of them.  :)  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2018-04-18. Score: 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.
  
  > **Comments:**
  > **username_0**: 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!  
  
  ---
  
  ### Answer by username_3 on 2018-04-04. Score: 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](https://link.springer.com/article/10.1007/s10994-017-5666-0) 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](https://link.springer.com/article/10.1007/s10994-017-5666-0) I have mentioned. I am sure you will receive lots of inspiration. I have also written a [summary](https://username_3.github.io/Emotion-in-RL/) 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!
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  ### Answer by username_4 on 2018-04-03. Score: 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.
  
  > **Comments:**
  > **username_0**: Yes. Maybe with an operation screen. But the idea is to be unsupervised.  
  
  ---
  
  