# -*- coding: utf-8 -*- """ Emotion Test Suite V2 - Enhanced emotion detection test cases VERSION 2 - Extended test cases for multi-emotion model evaluation Preserves V1 compatibility while adding more nuanced test cases Changes from V1: - Added more colloquial/natural language test cases - Added edge cases for commonly misclassified emotions - Added tests for context-based emotion detection - Expanded neutral, thinking, silly, sympathy, longing tests """ from typing import Dict, List, Tuple from dataclasses import dataclass @dataclass class EmotionTestCase: """Single test case for emotion detection""" emotion: str text: str expected_polarity: str category: str # positive, negative, neutral class EmotionTestSuiteV2: """ Enhanced test suite for multi-emotion model evaluation Key improvements: - More natural language variations - Better coverage of edge cases - Extended neutral emotion tests - Context-sensitive emotion tests """ # Version identifier VERSION = "2.0.0" # === COMPLETE EMOTION TEST CASES V2 === # Format: emotion -> [(text, expected_polarity), ...] EMOTION_TEST_DATA: Dict[str, List[Tuple[str, str]]] = { # ========================================== # POSITIVE EMOTIONS - HIGH AROUSAL # ========================================== "joy": [ ("I feel so much joy right now!", "positive"), ("This brings me pure joy", "positive"), ("Joy fills my heart", "positive"), ("What a joyful moment", "positive"), ("I'm full of joy today", "positive"), ("This is the best day ever!", "positive"), ("Everything is going perfectly!", "positive"), ], "happiness": [ ("I am so happy today!", "positive"), ("This makes me really happy", "positive"), ("I feel happy and content", "positive"), ("Happiness is all around", "positive"), ("I'm genuinely happy", "positive"), ("I am good", "positive"), ("I'm doing great", "positive"), ("Life is beautiful", "positive"), ("Things are going well", "positive"), ("I'm in a good mood", "positive"), ], "excitement": [ ("I'm so excited about this!", "positive"), ("This is really exciting", "positive"), ("I can't contain my excitement", "positive"), ("How exciting!", "positive"), ("I'm thrilled and excited", "positive"), ("I can't wait!", "positive"), ("This is going to be amazing!", "positive"), ("I'm pumped up!", "positive"), ], "ecstasy": [ ("I'm in absolute ecstasy!", "positive"), ("This is pure ecstasy", "positive"), ("Ecstatic about the news", "positive"), ("I feel ecstatic", "positive"), ("What ecstasy!", "positive"), ("I've never been happier!", "positive"), ("This is beyond amazing!", "positive"), ], "elation": [ ("I'm elated by the results", "positive"), ("Such elation!", "positive"), ("I feel elated", "positive"), ("Elation washes over me", "positive"), ("I'm absolutely elated", "positive"), ], "euphoria": [ ("I'm in a state of euphoria", "positive"), ("Pure euphoria right now", "positive"), ("This euphoric feeling", "positive"), ("I feel euphoric", "positive"), ("Euphoria takes over", "positive"), ], "thrill": [ ("What a thrill!", "positive"), ("I'm thrilled about this", "positive"), ("This is thrilling", "positive"), ("I feel thrilled", "positive"), ("Such a thrilling experience", "positive"), ], "delight": [ ("I'm delighted to hear that", "positive"), ("What a delight!", "positive"), ("This is delightful", "positive"), ("I'm absolutely delighted", "positive"), ("Such delight!", "positive"), ], "cheerfulness": [ ("I'm feeling cheerful today", "positive"), ("Such cheerfulness around", "positive"), ("Cheerful vibes only", "positive"), ("I feel cheerful", "positive"), ("What a cheerful day", "positive"), ], "enthusiasm": [ ("I'm very enthusiastic about this project", "positive"), ("My enthusiasm is through the roof", "positive"), ("I feel enthusiastic and eager", "positive"), ("Such enthusiasm!", "positive"), ("I'm enthusiastically looking forward to it", "positive"), ], # ========================================== # POSITIVE EMOTIONS - MEDIUM AROUSAL # ========================================== "contentment": [ ("I feel content with my life", "positive"), ("Such contentment", "positive"), ("I'm content and at peace", "positive"), ("Contentment fills me", "positive"), ("I feel okay", "positive"), ("I'm fine", "positive"), ("All is well", "positive"), ], "satisfaction": [ ("I'm satisfied with the outcome", "positive"), ("Great satisfaction", "positive"), ("I feel satisfied", "positive"), ("Satisfaction guaranteed", "positive"), ("Very satisfying", "positive"), ("That hit the spot", "positive"), ], "serenity": [ ("I feel serene and calm", "positive"), ("Such serenity", "positive"), ("Serenity now", "positive"), ("A serene feeling", "positive"), ("I'm at peace and serene", "positive"), ], "calm": [ ("I feel calm and relaxed", "positive"), ("So calm right now", "positive"), ("Calmness washes over me", "positive"), ("I'm staying calm", "positive"), ("Very calm today", "positive"), ("I'm at peace", "positive"), ("Feeling zen", "positive"), ], "relaxed": [ ("I'm feeling relaxed", "positive"), ("So relaxed right now", "positive"), ("I feel relaxed and happy", "positive"), ("Relaxed vibes", "positive"), ("Totally relaxed", "positive"), ("Chilling out", "positive"), ], "relief": [ ("What a relief!", "positive"), ("I feel relieved", "positive"), ("Such relief", "positive"), ("I'm so relieved", "positive"), ("Relief washes over me", "positive"), ("Phew, that's over", "positive"), ], "pride": [ ("I'm so proud of this", "positive"), ("Pride in my work", "positive"), ("I feel proud", "positive"), ("Such pride", "positive"), ("I'm proud of myself", "positive"), ("I did it!", "positive"), ("I accomplished my goal", "positive"), ], "confidence": [ ("I feel confident about this", "positive"), ("Confidence is high", "positive"), ("I'm confident", "positive"), ("Such confidence", "positive"), ("I feel self-confident", "positive"), ("I know I can do this", "positive"), ], "pleasure": [ ("It's my pleasure", "positive"), ("Such pleasure", "positive"), ("I feel pleasure", "positive"), ("What a pleasure", "positive"), ("Pure pleasure", "positive"), ], # ========================================== # LOVE & AFFECTION # ========================================== "love": [ ("I love this so much!", "positive"), ("I'm in love", "positive"), ("Love is in the air", "positive"), ("I love you", "positive"), ("Such love", "positive"), ("My heart is full of love", "positive"), ("I adore you", "positive"), ], "adoration": [ ("I adore this", "positive"), ("Such adoration", "positive"), ("I feel adoration", "positive"), ("Adoring this moment", "positive"), ("I absolutely adore it", "positive"), ], "affection": [ ("I feel great affection", "positive"), ("Such affection", "positive"), ("Affection for everyone", "positive"), ("I feel affectionate", "positive"), ("Showing affection", "positive"), ("You mean so much to me", "positive"), ], "tenderness": [ ("Such tenderness", "positive"), ("I feel tender", "positive"), ("Tenderness in my heart", "positive"), ("A tender feeling", "positive"), ("Tender moments", "positive"), ], "caring": [ ("I really care about you", "positive"), ("Such caring", "positive"), ("I feel caring", "positive"), ("Caring deeply", "positive"), ("I'm caring for you", "positive"), ], "compassion": [ ("I feel compassion for them", "positive"), ("Such compassion", "positive"), ("Compassionate response", "positive"), ("I'm compassionate", "positive"), ("Showing compassion", "positive"), ], "empathy": [ ("I feel empathy for your situation", "positive"), ("Such empathy", "positive"), ("I'm empathetic", "positive"), ("Empathy is important", "positive"), ("Showing empathy", "positive"), ("I understand how you feel", "positive"), ], "gratitude": [ ("I'm so grateful for this", "positive"), ("Gratitude fills my heart", "positive"), ("Thank you so much", "positive"), ("I feel grateful", "positive"), ("Such gratitude", "positive"), ("I really appreciate this", "positive"), ("Thanks a lot!", "positive"), ], # ========================================== # INTEREST & CURIOSITY # ========================================== "curiosity": [ ("I'm curious about this", "positive"), ("Such curiosity", "positive"), ("I feel curious", "positive"), ("Curiosity got me", "positive"), ("I'm really curious", "positive"), ("I wonder what that is", "positive"), ("Tell me more", "positive"), ], "interest": [ ("I'm interested in learning more", "positive"), ("Such interest", "positive"), ("I feel interested", "positive"), ("This is interesting", "positive"), ("I'm very interested", "positive"), ("That's fascinating", "positive"), ], "fascination": [ ("I'm fascinated by this", "positive"), ("Such fascination", "positive"), ("I feel fascinated", "positive"), ("Fascinating!", "positive"), ("I'm absolutely fascinated", "positive"), ], "wonder": [ ("I wonder about this", "positive"), ("Such wonder", "positive"), ("I feel wonder", "positive"), ("Wonderful!", "positive"), ("I'm in wonder", "positive"), ], "awe": [ ("I'm in awe", "positive"), ("Such awe", "positive"), ("I feel awe", "positive"), ("Awe-inspiring", "positive"), ("I'm awestruck", "positive"), ], "amazement": [ ("I'm amazed!", "positive"), ("Such amazement", "positive"), ("I feel amazed", "positive"), ("Amazing!", "positive"), ("I'm absolutely amazed", "positive"), ], "intrigue": [ ("I'm intrigued", "positive"), ("Such intrigue", "positive"), ("I feel intrigued", "positive"), ("Intriguing!", "positive"), ("Very intriguing", "positive"), ], # ========================================== # SURPRISE (can be positive or negative based on context) # ========================================== "surprise": [ ("What a surprise!", "positive"), ("I'm surprised", "positive"), ("Such a surprise", "positive"), ("Surprising!", "positive"), ("I'm pleasantly surprised", "positive"), ("I didn't expect that!", "positive"), ], "astonishment": [ ("I'm astonished!", "positive"), ("Such astonishment", "positive"), ("I feel astonished", "positive"), ("Astonishing!", "positive"), ("I'm absolutely astonished", "positive"), ], "shock": [ ("I'm in shock", "negative"), ("Shocking news", "negative"), ("I feel shocked", "negative"), ("What a shock", "negative"), ("I'm completely shocked", "negative"), ("I can't believe this happened", "negative"), ], # ========================================== # NEUTRAL / THINKING - EXPANDED FOR V2 # ========================================== "neutral": [ ("The weather is average today", "neutral"), ("It's just okay", "neutral"), ("Nothing special", "neutral"), ("I don't have strong feelings", "neutral"), ("It is what it is", "neutral"), ("No comment", "neutral"), ("I have no opinion", "neutral"), ("It doesn't matter to me", "neutral"), ("I'm indifferent", "neutral"), ("Whatever", "neutral"), ("It's neither good nor bad", "neutral"), ("The meeting is at 3pm", "neutral"), ("The sky is blue", "neutral"), ], "thinking": [ ("I'm thinking about it", "neutral"), ("Let me think", "neutral"), ("I need to think", "neutral"), ("Thinking hard", "neutral"), ("I'm contemplating", "neutral"), ("Hmm, let me consider", "neutral"), ("I need to process this", "neutral"), ("Give me a moment to think", "neutral"), ("I'm pondering", "neutral"), ("Let me reflect on that", "neutral"), ], "uncertain": [ ("I'm not sure about this", "negative"), ("Feeling uncertain", "negative"), ("I'm uncertain", "negative"), ("Uncertainty lingers", "negative"), ("I feel unsure", "negative"), ("I don't know what to do", "negative"), ("I'm having doubts", "negative"), ], # ========================================== # CONFUSION # ========================================== "confused": [ ("I'm so confused", "negative"), ("This is confusing", "negative"), ("I feel confused", "negative"), ("Confusion everywhere", "negative"), ("I'm really confused", "negative"), ("I don't understand", "negative"), ("This makes no sense", "negative"), ], "puzzled": [ ("I'm puzzled by this", "negative"), ("Such a puzzle", "negative"), ("I feel puzzled", "negative"), ("Puzzling!", "negative"), ("I'm quite puzzled", "negative"), ], "perplexed": [ ("I'm perplexed", "negative"), ("Such perplexity", "negative"), ("I feel perplexed", "negative"), ("Perplexing situation", "negative"), ("I'm thoroughly perplexed", "negative"), ], "bewildered": [ ("I'm bewildered", "negative"), ("Feeling bewildered", "negative"), ("I feel bewildered", "negative"), ("Bewildering!", "negative"), ("I'm completely bewildered", "negative"), ], "baffled": [ ("I'm baffled by this", "negative"), ("Such bafflement", "negative"), ("I feel baffled", "negative"), ("Baffling!", "negative"), ("I'm totally baffled", "negative"), ], # ========================================== # SADNESS # ========================================== "sadness": [ ("I feel so sad", "negative"), ("Such sadness", "negative"), ("I'm really sad", "negative"), ("Sadness fills me", "negative"), ("I'm feeling sad today", "negative"), ("This makes me sad", "negative"), ("I feel down", "negative"), ], "sorrow": [ ("I feel deep sorrow", "negative"), ("Such sorrow", "negative"), ("Sorrow in my heart", "negative"), ("I'm sorrowful", "negative"), ("Overwhelming sorrow", "negative"), ], "grief": [ ("I'm grieving", "negative"), ("Such grief", "negative"), ("I feel grief", "negative"), ("Grief consumes me", "negative"), ("Deep grief", "negative"), ("I'm mourning the loss", "negative"), ], "melancholy": [ ("I feel melancholy", "negative"), ("Such melancholy", "negative"), ("A melancholy mood", "negative"), ("I'm melancholic", "negative"), ("Melancholy sets in", "negative"), ], "disappointment": [ ("I'm disappointed", "negative"), ("Such disappointment", "negative"), ("I feel disappointed", "negative"), ("Disappointing!", "negative"), ("I'm really disappointed", "negative"), ("This let me down", "negative"), ], "despair": [ ("I'm in despair", "negative"), ("Such despair", "negative"), ("I feel despair", "negative"), ("Despair takes over", "negative"), ("I'm filled with despair", "negative"), ], "loneliness": [ ("I feel so lonely", "negative"), ("Such loneliness", "negative"), ("I'm lonely", "negative"), ("Loneliness consumes me", "negative"), ("I feel alone", "negative"), ("I have no one", "negative"), ], "hurt": [ ("I feel hurt", "negative"), ("That hurts", "negative"), ("I'm hurt", "negative"), ("Feeling hurt", "negative"), ("I'm really hurt", "negative"), ("You hurt my feelings", "negative"), ], "misery": [ ("I'm miserable", "negative"), ("Such misery", "negative"), ("I feel miserable", "negative"), ("Misery everywhere", "negative"), ("I'm in misery", "negative"), ], # ========================================== # FEAR & ANXIETY # ========================================== "fear": [ ("I'm afraid", "negative"), ("I feel fear", "negative"), ("Fear grips me", "negative"), ("I'm scared", "negative"), ("Such fear", "negative"), ("I'm frightened", "negative"), ], "terror": [ ("I'm terrified", "negative"), ("Such terror", "negative"), ("I feel terror", "negative"), ("Terrifying!", "negative"), ("I'm in terror", "negative"), ], "horror": [ ("I'm horrified", "negative"), ("Such horror", "negative"), ("I feel horror", "negative"), ("Horrifying!", "negative"), ("Horror fills me", "negative"), ], "dread": [ ("I feel dread", "negative"), ("Such dread", "negative"), ("I'm dreading it", "negative"), ("Dreadful!", "negative"), ("I'm filled with dread", "negative"), ], "anxiety": [ ("I feel anxious", "negative"), ("Such anxiety", "negative"), ("I'm anxious", "negative"), ("Anxiety takes over", "negative"), ("I'm very anxious", "negative"), ("I'm having anxiety", "negative"), ], "worry": [ ("I'm worried", "negative"), ("Such worry", "negative"), ("I feel worried", "negative"), ("Worrying about it", "negative"), ("I'm really worried", "negative"), ], "nervousness": [ ("I'm nervous", "negative"), ("Such nervousness", "negative"), ("I feel nervous", "negative"), ("Nervous about it", "negative"), ("I'm very nervous", "negative"), ], "apprehension": [ ("I feel apprehensive", "negative"), ("Such apprehension", "negative"), ("I'm apprehensive", "negative"), ("Apprehension sets in", "negative"), ("I'm filled with apprehension", "negative"), ], "panic": [ ("I'm panicking", "negative"), ("Such panic", "negative"), ("I feel panic", "negative"), ("Panic mode!", "negative"), ("I'm in a panic", "negative"), ], # ========================================== # ANGER & FRUSTRATION # ========================================== "anger": [ ("I'm so angry!", "negative"), ("Such anger", "negative"), ("I feel angry", "negative"), ("Anger fills me", "negative"), ("I'm really angry", "negative"), ("This makes me mad", "negative"), ], "rage": [ ("I'm in a rage", "negative"), ("Such rage", "negative"), ("I feel rage", "negative"), ("Rage takes over", "negative"), ("I'm filled with rage", "negative"), ], "fury": [ ("I'm furious!", "negative"), ("Such fury", "negative"), ("I feel fury", "negative"), ("Fury consumes me", "negative"), ("I'm absolutely furious", "negative"), ("I'm livid!", "negative"), ], "irritation": [ ("I'm irritated", "negative"), ("Such irritation", "negative"), ("I feel irritated", "negative"), ("Irritating!", "negative"), ("I'm really irritated", "negative"), ], "annoyance": [ ("I'm annoyed", "negative"), ("Such annoyance", "negative"), ("I feel annoyed", "negative"), ("Annoying!", "negative"), ("I'm really annoyed", "negative"), ("This is getting on my nerves", "negative"), ], "frustration": [ ("I'm frustrated!", "negative"), ("Such frustration", "negative"), ("I feel frustrated", "negative"), ("Frustrating!", "negative"), ("I'm so frustrated", "negative"), ("Why won't this work!", "negative"), ], "resentment": [ ("I feel resentment", "negative"), ("Such resentment", "negative"), ("I'm resentful", "negative"), ("Resentment builds", "negative"), ("I'm filled with resentment", "negative"), ], "hostility": [ ("I feel hostile", "negative"), ("Such hostility", "negative"), ("I'm hostile", "negative"), ("Hostility in the air", "negative"), ("I'm feeling hostile", "negative"), ], "bitterness": [ ("I feel bitter", "negative"), ("Such bitterness", "negative"), ("I'm bitter", "negative"), ("Bitterness takes over", "negative"), ("I'm really bitter", "negative"), ], # ========================================== # DISGUST & CONTEMPT # ========================================== "disgust": [ ("I'm disgusted", "negative"), ("Such disgust", "negative"), ("I feel disgust", "negative"), ("Disgusting!", "negative"), ("I'm really disgusted", "negative"), ("That's gross", "negative"), ], "revulsion": [ ("I feel revulsion", "negative"), ("Such revulsion", "negative"), ("I'm revolted", "negative"), ("Revolting!", "negative"), ("I feel revolted", "negative"), ], "contempt": [ ("I feel contempt", "negative"), ("Such contempt", "negative"), ("I'm contemptuous", "negative"), ("Contempt for this", "negative"), ("I'm filled with contempt", "negative"), ], "disdain": [ ("I feel disdain", "negative"), ("Such disdain", "negative"), ("I'm disdainful", "negative"), ("Disdain for this", "negative"), ("I'm filled with disdain", "negative"), ], "scorn": [ ("I feel scorn", "negative"), ("Such scorn", "negative"), ("I'm scornful", "negative"), ("Scorn for this", "negative"), ("I'm filled with scorn", "negative"), ], # ========================================== # SHAME & EMBARRASSMENT # ========================================== "shame": [ ("I feel ashamed", "negative"), ("Such shame", "negative"), ("I'm ashamed", "negative"), ("Shame on me", "negative"), ("I'm filled with shame", "negative"), ], "embarrassment": [ ("I'm embarrassed", "negative"), ("Such embarrassment", "negative"), ("I feel embarrassed", "negative"), ("Embarrassing!", "negative"), ("I'm really embarrassed", "negative"), ("That was awkward", "negative"), ("I want to hide", "negative"), ], "guilt": [ ("I feel guilty", "negative"), ("Such guilt", "negative"), ("I'm guilty", "negative"), ("Guilt consumes me", "negative"), ("I'm filled with guilt", "negative"), ], "regret": [ ("I regret this", "negative"), ("Such regret", "negative"), ("I feel regret", "negative"), ("Regretful!", "negative"), ("I'm filled with regret", "negative"), ], "remorse": [ ("I feel remorse", "negative"), ("Such remorse", "negative"), ("I'm remorseful", "negative"), ("Remorse takes over", "negative"), ("I'm filled with remorse", "negative"), ], "humiliation": [ ("I feel humiliated", "negative"), ("Such humiliation", "negative"), ("I'm humiliated", "negative"), ("Humiliating!", "negative"), ("I'm filled with humiliation", "negative"), ], # ========================================== # BOREDOM & TIREDNESS # ========================================== "boredom": [ ("I'm bored", "negative"), ("Such boredom", "negative"), ("I feel bored", "negative"), ("Boring!", "negative"), ("I'm really bored", "negative"), ("There's nothing to do", "negative"), ], "tiredness": [ ("I'm tired", "negative"), ("Such tiredness", "negative"), ("I feel tired", "negative"), ("Tiring!", "negative"), ("I'm really tired", "negative"), ("I need rest", "negative"), ], "exhaustion": [ ("I'm exhausted", "negative"), ("Such exhaustion", "negative"), ("I feel exhausted", "negative"), ("Exhausting!", "negative"), ("I'm completely exhausted", "negative"), ], "fatigue": [ ("I feel fatigued", "negative"), ("Such fatigue", "negative"), ("I'm fatigued", "negative"), ("Fatigue sets in", "negative"), ("I'm feeling fatigue", "negative"), ], "weariness": [ ("I feel weary", "negative"), ("Such weariness", "negative"), ("I'm weary", "negative"), ("Weariness takes over", "negative"), ("I'm feeling weary", "negative"), ], # ========================================== # ENVY & JEALOUSY # ========================================== "envy": [ ("I feel envious", "negative"), ("Such envy", "negative"), ("I'm envious", "negative"), ("Envy takes over", "negative"), ("I'm filled with envy", "negative"), ("I wish I had that", "negative"), ], "jealousy": [ ("I feel jealous", "negative"), ("Such jealousy", "negative"), ("I'm jealous", "negative"), ("Jealousy consumes me", "negative"), ("I'm really jealous", "negative"), ], # ========================================== # PLAYFUL & SILLY - EXPANDED FOR V2 # ========================================== "playful": [ ("I'm feeling playful", "positive"), ("Such playfulness", "positive"), ("Playful mood", "positive"), ("I'm in a playful mood", "positive"), ("Being playful", "positive"), ("Let's have some fun!", "positive"), ("I'm just goofing around", "positive"), ], "silly": [ ("I'm feeling silly", "positive"), ("Such silliness", "positive"), ("Silly mood", "positive"), ("I'm being silly", "positive"), ("Feeling silly", "positive"), ("That's so silly!", "positive"), ("I'm acting goofy", "positive"), ("Just being ridiculous", "positive"), ], "mischievous": [ ("I'm feeling mischievous", "positive"), ("Such mischief", "positive"), ("Mischievous mood", "positive"), ("I'm being mischievous", "positive"), ("Feeling mischievous", "positive"), ("I'm up to no good", "positive"), ], "amusement": [ ("I'm amused", "positive"), ("Such amusement", "positive"), ("I feel amused", "positive"), ("Amusing!", "positive"), ("I'm really amused", "positive"), ("LOL", "positive"), ("haha", "positive"), ("That's hilarious!", "positive"), ("I can't stop laughing", "positive"), ("LMAO", "positive"), ("😂", "positive"), ], # ========================================== # SPECIAL STATES - EXPANDED FOR V2 # ========================================== "sympathy": [ ("I feel sympathy for you", "positive"), ("Such sympathy", "positive"), ("I'm sympathetic", "positive"), ("Sympathy for your loss", "positive"), ("I feel sympathetic", "positive"), ("I'm sorry for what happened", "positive"), ("My heart goes out to you", "positive"), ("I feel for you", "positive"), ], "nostalgia": [ ("I feel nostalgic", "positive"), ("Such nostalgia", "positive"), ("I'm nostalgic", "positive"), ("Nostalgia hits", "positive"), ("Feeling nostalgic", "positive"), ("Those were the good old days", "positive"), ("I remember when...", "positive"), ], "hope": [ ("I feel hopeful", "positive"), ("Such hope", "positive"), ("I'm hopeful", "positive"), ("Hope is alive", "positive"), ("I have hope", "positive"), ("Things will get better", "positive"), ("I'm looking forward to it", "positive"), ], "optimism": [ ("I feel optimistic", "positive"), ("Such optimism", "positive"), ("I'm optimistic", "positive"), ("Optimism takes over", "positive"), ("I'm feeling optimistic", "positive"), ("The future looks bright", "positive"), ], "pessimism": [ ("I feel pessimistic", "negative"), ("Such pessimism", "negative"), ("I'm pessimistic", "negative"), ("Pessimism sets in", "negative"), ("I'm feeling pessimistic", "negative"), ("Nothing good will happen", "negative"), ], "longing": [ ("I'm longing for you", "negative"), ("Such longing", "negative"), ("I feel longing", "negative"), ("Longing for the past", "negative"), ("I miss you", "negative"), ("I wish things were different", "negative"), ("If only...", "negative"), ], "yearning": [ ("I'm yearning for this", "negative"), ("Such yearning", "negative"), ("I feel yearning", "negative"), ("Yearning for more", "negative"), ("I'm filled with yearning", "negative"), ], # ========================================== # NEW IN V2: ADDITIONAL EMOTIONS # ========================================== "determination": [ ("I'm determined to succeed", "positive"), ("Such determination", "positive"), ("I feel determined", "positive"), ("Nothing will stop me", "positive"), ("I won't give up", "positive"), ], "inspiration": [ ("I feel inspired", "positive"), ("Such inspiration", "positive"), ("I'm inspired", "positive"), ("This is inspiring", "positive"), ("Feeling inspired", "positive"), ], "anticipation": [ ("I'm looking forward to this", "positive"), ("Such anticipation", "positive"), ("I feel anticipation", "positive"), ("I can't wait to see what happens", "positive"), ("Eagerly anticipating", "positive"), ], "trust": [ ("I trust you", "positive"), ("Such trust", "positive"), ("I feel trust", "positive"), ("I have faith in you", "positive"), ("I believe in you", "positive"), ], "acceptance": [ ("I accept this", "positive"), ("Such acceptance", "positive"), ("I feel acceptance", "positive"), ("I've come to accept it", "positive"), ("I'm at peace with it", "positive"), ], "sarcasm": [ ("Oh great, just what I needed", "negative"), ("Yeah, that's exactly what I wanted", "negative"), ("Oh wonderful", "negative"), ("Wow, fantastic", "negative"), ("Just perfect", "negative"), ], } def get_all_emotions(self) -> List[str]: """Get list of all emotions in the test suite""" return list(self.EMOTION_TEST_DATA.keys()) def get_test_cases(self, emotion: str) -> List[Tuple[str, str]]: """Get test cases for a specific emotion""" return self.EMOTION_TEST_DATA.get(emotion, []) def get_all_test_cases(self) -> List[EmotionTestCase]: """Get all test cases as EmotionTestCase objects""" cases = [] for emotion, tests in self.EMOTION_TEST_DATA.items(): for text, polarity in tests: cases.append(EmotionTestCase( emotion=emotion, text=text, expected_polarity=polarity, category=polarity )) return cases def get_emotion_count(self) -> int: """Get total number of emotions""" return len(self.EMOTION_TEST_DATA) def get_test_count(self) -> int: """Get total number of test cases""" return sum(len(tests) for tests in self.EMOTION_TEST_DATA.values()) if __name__ == "__main__": suite = EmotionTestSuiteV2() print(f"Emotion Test Suite V2") print(f"Version: {suite.VERSION}") print(f"Total emotions: {suite.get_emotion_count()}") print(f"Total test cases: {suite.get_test_count()}") print(f"\nNew emotions in V2: determination, inspiration, anticipation, trust, acceptance, sarcasm")