Closed IgorCersosimo closed 3 years ago
The "emotion" function is returning inconsistent results.
Example 1: emotion("I lie")
emotion("I lie")
The result should be a score 1 for "anger", "disgust" and "sadness". The function, instead, returns score 3 for such emotions.
Looking at the code, the problem seems to be the result of an incorrect "merge" operation on the temporary variable "out".
Notice that the problem disappears when analyzing multiple sentences in a vector, if at least one of the sentences contains a negated emotion.
Example 2: emotion(c("I don't love", "I lie")) The score for the second sentence is correct.
emotion(c("I don't love", "I lie"))
Example 3: emotion(c("I love", "I lie")) The score for the second sentence is different from the example above and incorrect.
emotion(c("I love", "I lie"))
Thank you for bringing this to my attention. I'll look into it.
Thanks again. This has been addressed.
Glad I could help!
The "emotion" function is returning inconsistent results.
Example 1:
emotion("I lie")
The result should be a score 1 for "anger", "disgust" and "sadness". The function, instead, returns score 3 for such emotions.
Looking at the code, the problem seems to be the result of an incorrect "merge" operation on the temporary variable "out".
Notice that the problem disappears when analyzing multiple sentences in a vector, if at least one of the sentences contains a negated emotion.
Example 2:
emotion(c("I don't love", "I lie"))
The score for the second sentence is correct.Example 3:
emotion(c("I love", "I lie"))
The score for the second sentence is different from the example above and incorrect.