synesketch.emotion
Class EmotionalState

java.lang.Object
  extended by synesketch.SynesketchState
      extended by synesketch.emotion.EmotionalState

public class EmotionalState
extends SynesketchState

Defines emotional content of the text.

That is:

Weights have values between 0 and 1 (0 for no emotion, 1 for full emotion, 0.5 for the emotion of average intesity). Valence can be -1, 0, or 1 (negative, neutral, and positive emotion, respectively).

Version:
1.0
Author:
Uros Krcadinac email: uros@krcadinac.com

Constructor Summary
EmotionalState()
          Empty class constructor
EmotionalState(java.lang.String text)
          Class constructor which sets the text.
EmotionalState(java.lang.String text, java.util.SortedSet<Emotion> emotions, double generalWeight, int valence)
          Class constuctor which sets the text, general emotional weight, emotional valence, and all of the emotional weights (in a form of a SortedSet).
 
Method Summary
 Emotion getAnger()
          Getter for the Emotion of anger.
 double getAngerWeight()
          Getter for the anger weight
 Emotion getDisgust()
          Getter for the Emotion of disgust.
 double getDisgustWeight()
          Getter for the disgust weight
 Emotion getFear()
          Getter for the Emotion of fear.
 double getFearWeight()
          Getter for the fear weight
 java.util.List<Emotion> getFirstStrongestEmotions(int stop)
          Returns several emotions (Emotion instances) with the highest weight.
 double getGeneralWeight()
          Getter for the general emotional weight
 Emotion getHappiness()
          Getter for the Emotion of happiness.
 double getHappinessWeight()
          Getter for the happiness weight
 EmotionalState getPrevious()
          Getter for the previous EmotionalState
 Emotion getSadness()
          Getter for the Emotion of sadness.
 double getSadnessWeight()
          Getter for the sadness weight
 Emotion getStrongestEmotion()
          Returns Emotion with the highest weight.
 Emotion getSurprise()
          Getter for the Emotion of surprise
 double getSurpriseWeight()
          Getter for the surprise weight
 int getValence()
          Getter for the emotional valence
 void setPrevious(EmotionalState previous)
          Setter for the previous EmotionalState
 java.lang.String toString()
          Transforms emotional data into a descriptional sentence ('toString' method)
 
Methods inherited from class synesketch.SynesketchState
getText
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmotionalState

public EmotionalState()
Empty class constructor


EmotionalState

public EmotionalState(java.lang.String text)
Class constructor which sets the text.

Parameters:
text - String representing the text

EmotionalState

public EmotionalState(java.lang.String text,
                      java.util.SortedSet<Emotion> emotions,
                      double generalWeight,
                      int valence)
Class constuctor which sets the text, general emotional weight, emotional valence, and all of the emotional weights (in a form of a SortedSet).

Parameters:
text - String representing the text
emotions - SortedSet containing all of the specific Ekman emotinal weights, defined by the Emotion class
generalWeight - double representing the general emotional weight
valence - int representing the emotinal valence
Method Detail

getStrongestEmotion

public Emotion getStrongestEmotion()
Returns Emotion with the highest weight.

Returns:
Emotion with the highest weight

getFirstStrongestEmotions

public java.util.List<Emotion> getFirstStrongestEmotions(int stop)
Returns several emotions (Emotion instances) with the highest weight.

Parameters:
stop - int representing the number of emotions which is to searched for
Returns:
list of emotions (Emotion instances) with the highest weight

getHappiness

public Emotion getHappiness()
Getter for the Emotion of happiness.

Returns:
Emotion of happiness

getHappinessWeight

public double getHappinessWeight()
Getter for the happiness weight

Returns:
double representing the happiness weight

getSadness

public Emotion getSadness()
Getter for the Emotion of sadness.

Returns:
Emotion of sadness

getSadnessWeight

public double getSadnessWeight()
Getter for the sadness weight

Returns:
double representing the sadness weight

getFear

public Emotion getFear()
Getter for the Emotion of fear.

Returns:
Emotion of fear

getFearWeight

public double getFearWeight()
Getter for the fear weight

Returns:
double representing the fear weight

getAnger

public Emotion getAnger()
Getter for the Emotion of anger.

Returns:
Emotion of anger

getAngerWeight

public double getAngerWeight()
Getter for the anger weight

Returns:
double representing the anger weight

getDisgust

public Emotion getDisgust()
Getter for the Emotion of disgust.

Returns:
Emotion of disgust

getDisgustWeight

public double getDisgustWeight()
Getter for the disgust weight

Returns:
double representing the disgust weight

getSurprise

public Emotion getSurprise()
Getter for the Emotion of surprise

Returns:
Emotion of surprise

getSurpriseWeight

public double getSurpriseWeight()
Getter for the surprise weight

Returns:
double representing the surprise weight

getPrevious

public EmotionalState getPrevious()
Getter for the previous EmotionalState

Returns:
previous EmotionalState

setPrevious

public void setPrevious(EmotionalState previous)
Setter for the previous EmotionalState

Parameters:
previous - previous EmotionalState

getValence

public int getValence()
Getter for the emotional valence

Returns:
emotional valence

getGeneralWeight

public double getGeneralWeight()
Getter for the general emotional weight

Returns:
general emotional weight

toString

public java.lang.String toString()
Transforms emotional data into a descriptional sentence ('toString' method)

Overrides:
toString in class java.lang.Object
Returns:
String description of a emotinal data