Class EmotionResult

java.lang.Object
ch.privately.owas.nlp.EmotionResult

public class EmotionResult extends Object
 Representation of an emotion classification result.
 The supported emotions are:
 "anger", "fear", "joy", "love", "neutral", "sadness" and "surprise".
 
  • Method Details

    • getEmotionScoreMap

      public Map<Emotion,​Float> getEmotionScoreMap()
      Returns:
      A mapping of emotion to score, represented as probabilities.
    • highestRankedEmotion

      public Emotion highestRankedEmotion()
      Returns:
      The emotion with the highest score.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object