|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsynesketch.SynesketchState
synesketch.emotion.EmotionalState
public class EmotionalState
Defines emotional content of the text.
That is:
Emotion.
EmotionalState (so that whole emotional history of one
conversation can be accessed from the Processing applet (PApplet)).
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).
| 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 |
|---|
public EmotionalState()
public EmotionalState(java.lang.String text)
text - String representing the text
public EmotionalState(java.lang.String text,
java.util.SortedSet<Emotion> emotions,
double generalWeight,
int valence)
text - String representing the textemotions - SortedSet containing all of the specific Ekman emotinal
weights, defined by the Emotion classgeneralWeight - double representing the general emotional weightvalence - int representing the emotinal valence| Method Detail |
|---|
public Emotion getStrongestEmotion()
Emotion with the highest weight.
public java.util.List<Emotion> getFirstStrongestEmotions(int stop)
Emotion instances) with the highest
weight.
stop - int representing the number of emotions which is to searched
for
Emotion instances) with the highest
weightpublic Emotion getHappiness()
Emotion of happiness.
Emotion of happinesspublic double getHappinessWeight()
public Emotion getSadness()
Emotion of sadness.
Emotion of sadnesspublic double getSadnessWeight()
public Emotion getFear()
Emotion of fear.
Emotion of fearpublic double getFearWeight()
public Emotion getAnger()
Emotion of anger.
Emotion of angerpublic double getAngerWeight()
public Emotion getDisgust()
Emotion of disgust.
Emotion of disgustpublic double getDisgustWeight()
public Emotion getSurprise()
Emotion of surprise
Emotion of surprisepublic double getSurpriseWeight()
public EmotionalState getPrevious()
EmotionalState
EmotionalStatepublic void setPrevious(EmotionalState previous)
EmotionalState
previous - previous EmotionalStatepublic int getValence()
public double getGeneralWeight()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||