Spaces:
Sleeping
Sleeping
Create OMEresponse.py
Browse files- OMEresponse.py +111 -0
OMEresponse.py
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from enum import Enum, unique
|
| 2 |
+
from dataclasses import dataclass
|
| 3 |
+
|
| 4 |
+
@unique
|
| 5 |
+
class OMEResponse(Enum):
|
| 6 |
+
TRUST_XTREME = "trust-xtreme"
|
| 7 |
+
TRUST_VERY = "trust-very"
|
| 8 |
+
TRUST_REALLY = "trust-really"
|
| 9 |
+
TRUST_QUITE = "trust-quite"
|
| 10 |
+
TRUST_PARTIAL = "trust-partial"
|
| 11 |
+
TRUST_MAYBE = "trust-maybe"
|
| 12 |
+
HAPPINESS_XTREME = "happiness-xtreme"
|
| 13 |
+
HAPPINESS_VERY = "happiness-very"
|
| 14 |
+
HAPPINESS_REALLY = "happiness-really"
|
| 15 |
+
HAPPINESS_QUITE = "happiness-quite"
|
| 16 |
+
HAPPINESS_PARTIAL = "happiness-partial"
|
| 17 |
+
HAPPINESS_MAYBE = "happiness-maybe"
|
| 18 |
+
POSITIVE = "positive"
|
| 19 |
+
MORE_POSITIVE_THAN_NEGATIVE = "more-positive-than-negative"
|
| 20 |
+
NEUTRAL = "neutral"
|
| 21 |
+
MORE_NEGATIVE_THAN_POSITIVE = "more-negative-than-positive"
|
| 22 |
+
NEGATIVE = "negative"
|
| 23 |
+
SADNESS_XTREME = "sadness-xtreme"
|
| 24 |
+
SADNESS_VERY = "sadness-very"
|
| 25 |
+
SADNESS_REALLY = "sadness-really"
|
| 26 |
+
SADNESS_QUITE = "sadness-quite"
|
| 27 |
+
SADNESS_PARTIAL = "sadness-partial"
|
| 28 |
+
SADNESS_MAYBE = "sadness-maybe"
|
| 29 |
+
ANGER_XTREME = "anger-xtreme"
|
| 30 |
+
ANGER_VERY = "anger-very"
|
| 31 |
+
ANGER_REALLY = "anger-really"
|
| 32 |
+
ANGER_QUITE = "anger-quite"
|
| 33 |
+
ANGER_PARTIAL = "anger-partial"
|
| 34 |
+
ANGER_MAYBE = "anger-maybe"
|
| 35 |
+
FEAR_XTREME = "fear-xtreme"
|
| 36 |
+
FEAR_VERY = "fear-very"
|
| 37 |
+
FEAR_REALLY = "fear-really"
|
| 38 |
+
FEAR_QUITE = "fear-quite"
|
| 39 |
+
FEAR_PARTIAL = "fear-partial"
|
| 40 |
+
FEAR_MAYBE = "fear-maybe"
|
| 41 |
+
GUILT_XTREME = "guilt-xtreme"
|
| 42 |
+
GUILT_VERY = "guilt-very"
|
| 43 |
+
GUILT_REALLY = "guilt-really"
|
| 44 |
+
GUILT_QUITE = "guilt-quite"
|
| 45 |
+
GUILT_PARTIAL = "guilt-partial"
|
| 46 |
+
GUILT_MAYBE = "guilt-maybe"
|
| 47 |
+
JEALOUSY_XTREME = "jealousy-xtreme"
|
| 48 |
+
JEALOUSY_VERY = "jealousy-very"
|
| 49 |
+
JEALOUSY_REALLY = "jealousy-really"
|
| 50 |
+
JEALOUSY_QUITE = "jealousy-quite"
|
| 51 |
+
JEALOUSY_PARTIAL = "jealousy-partial"
|
| 52 |
+
JEALOUSY_MAYBE = "jealousy-maybe"
|
| 53 |
+
INDETERMINATE = "indeterminate"
|
| 54 |
+
|
| 55 |
+
@property
|
| 56 |
+
def reaction(self) -> str:
|
| 57 |
+
reactions = {
|
| 58 |
+
OMEResponse.TRUST_XTREME: " trust or love that could be extremely positive,",
|
| 59 |
+
OMEResponse.TRUST_VERY: " trust or love that could be very positive,",
|
| 60 |
+
OMEResponse.TRUST_REALLY: " trust or love that could be really positive,",
|
| 61 |
+
OMEResponse.TRUST_QUITE: " trust or love that could be quite positive,",
|
| 62 |
+
OMEResponse.TRUST_PARTIAL: " trust or love that could be somewhat positive,",
|
| 63 |
+
OMEResponse.TRUST_MAYBE: " trust or love that could be slightly positive,",
|
| 64 |
+
OMEResponse.HAPPINESS_XTREME: " happiness or pleasure that could be extremely positive,",
|
| 65 |
+
OMEResponse.HAPPINESS_VERY: " happiness or pleasure that could be very positive,",
|
| 66 |
+
OMEResponse.HAPPINESS_REALLY: " happiness or pleasure that could be really positive,",
|
| 67 |
+
OMEResponse.HAPPINESS_QUITE: " happiness or pleasure that could be quite positive,",
|
| 68 |
+
OMEResponse.HAPPINESS_PARTIAL: " happiness or pleasure that could be somewhat positive,",
|
| 69 |
+
OMEResponse.HAPPINESS_MAYBE: " happiness or pleasure that could be slightly positive,",
|
| 70 |
+
OMEResponse.POSITIVE: " something that could be positive,",
|
| 71 |
+
OMEResponse.MORE_POSITIVE_THAN_NEGATIVE: " something that could be more positive than negative,",
|
| 72 |
+
OMEResponse.NEUTRAL: " something, but it is neutral in value,",
|
| 73 |
+
OMEResponse.MORE_NEGATIVE_THAN_POSITIVE: " something that could be more negative than positive,",
|
| 74 |
+
OMEResponse.NEGATIVE: " something that could be negative,",
|
| 75 |
+
OMEResponse.SADNESS_XTREME: " sadness or trauma that could be extremely negative,",
|
| 76 |
+
OMEResponse.SADNESS_VERY: " sadness or trauma that could be very negative,",
|
| 77 |
+
OMEResponse.SADNESS_REALLY: " sadness or trauma that could be really negative,",
|
| 78 |
+
OMEResponse.SADNESS_QUITE: " sadness or trauma that could be quite negative",
|
| 79 |
+
OMEResponse.SADNESS_PARTIAL: " sadness or trauma that could be slightly negative,",
|
| 80 |
+
OMEResponse.SADNESS_MAYBE: " sadness or trauma that could be somewhat negative,",
|
| 81 |
+
OMEResponse.ANGER_XTREME: " anger or disgust that could be extremely negative,",
|
| 82 |
+
OMEResponse.ANGER_VERY: " anger or disgust that could be very negative,",
|
| 83 |
+
OMEResponse.ANGER_REALLY: " anger or disgust that could be really negative,",
|
| 84 |
+
OMEResponse.ANGER_QUITE: " anger or disgust that could be quite negative,",
|
| 85 |
+
OMEResponse.ANGER_PARTIAL: " anger or disgust that could be somewhat negative,",
|
| 86 |
+
OMEResponse.ANGER_MAYBE: " anger or disgust that could be slightly negative,",
|
| 87 |
+
OMEResponse.FEAR_XTREME: " fear or anxiety that could be extremely negative,",
|
| 88 |
+
OMEResponse.FEAR_VERY: " fear or anxiety that could be very negative,",
|
| 89 |
+
OMEResponse.FEAR_REALLY: " fear or anxiety that could be really negative,",
|
| 90 |
+
OMEResponse.FEAR_QUITE: " fear or anxiety that could be quite negative,",
|
| 91 |
+
OMEResponse.FEAR_PARTIAL: " fear or anxiety that could be somewhat negative,",
|
| 92 |
+
OMEResponse.FEAR_MAYBE: " fear or anxiety that could be slightly negative,",
|
| 93 |
+
OMEResponse.GUILT_XTREME: " shame or guilt that could be extremely negative,",
|
| 94 |
+
OMEResponse.GUILT_VERY: " shame or guilt that could be very negative,",
|
| 95 |
+
OMEResponse.GUILT_REALLY: " shame or guilt that could be really negative,",
|
| 96 |
+
OMEResponse.GUILT_QUITE: " shame or guilt that could be quite negative,",
|
| 97 |
+
OMEResponse.GUILT_PARTIAL: " shame or guilt that could be somewhat negative,",
|
| 98 |
+
OMEResponse.GUILT_MAYBE: " shame or guilt that could be slightly negative,",
|
| 99 |
+
OMEResponse.JEALOUSY_XTREME: " jealousy or envy that could be extremely negative,",
|
| 100 |
+
OMEResponse.JEALOUSY_VERY: " jealousy or envy that could be very negative,",
|
| 101 |
+
OMEResponse.JEALOUSY_REALLY: " jealousy or envy that could be really negative,",
|
| 102 |
+
OMEResponse.JEALOUSY_QUITE: " jealousy or envy that could be quite negative,",
|
| 103 |
+
OMEResponse.JEALOUSY_PARTIAL: " jealousy or envy that could be somewhat negative,",
|
| 104 |
+
OMEResponse.JEALOUSY_MAYBE: " jealousy or envy that could be slightly negative,",
|
| 105 |
+
OMEResponse.INDETERMINATE: " something, but it is indeterminate,"
|
| 106 |
+
}
|
| 107 |
+
return reactions[self]
|
| 108 |
+
|
| 109 |
+
@property
|
| 110 |
+
def display_name(self) -> str:
|
| 111 |
+
return self.value.replace("-", " ").title()
|