Hiyve Components - v1.0.0
    Preparing search index...

    Function emotionToSentiment

    • Maps an emotion string to a sentiment classification.

      Parameters

      • emotion: string

        Emotion type string (e.g. from MoodState.emotion)

      Returns "positive" | "negative" | "neutral"

      Sentiment classification

      Mapping:

      • happy, surprised'positive'
      • angry, fearful, disgusted, sad'negative'
      • neutral and all others → 'neutral'