Spaces:
Running
Running
File size: 37,689 Bytes
25e624c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 |
# -*- 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")
|