Emoji-AI-Avatar / evaluation /debug_sarcasm.py
Deminiko
Initial import: Emoji AI Avatar
25e624c
raw
history blame contribute delete
498 Bytes
# Test sarcasm detection
import sys
sys.path.insert(0, '.')
from avatar.sentiment_multi_emotion import MultiEmotionAnalyzer
a = MultiEmotionAnalyzer()
tests = [
'Oh great, just what I needed',
'Yeah, that is exactly what I wanted',
'Oh wonderful',
'Wow, fantastic',
'Just perfect',
]
print("\nSarcasm Test Cases:")
print("-" * 60)
for t in tests:
r = a.analyze(t)
print(f"'{t}'")
print(f" polarity={r['polarity']} label={r['label']} base={r['base_emotion']}")