class EmotionClassifier: def classify(self, t): if 'angry' in t: return 'angry' if 'happy' in t or 'fine' in t: return 'happy' return 'neutral'