Skip to main content

Module emotion_extraction

Module emotion_extraction 

Source
Expand description

Structural Emotion Extraction — text → PAD state via structural signals.

Replaces word-list-only valence detection. Instead of matching individual words (“happy” → positive), this module detects what happened in the text:

  1. Events: commits, builds, errors, fixes, pushes → structural emotions
  2. Speech acts: questions, imperatives, contemplation → arousal/dominance
  3. Self-correction: “nem emlékszem”, “igazad van”, “túlkapás” → positive structural signal (learning), not negative
  4. Context type: code, personal, philosophical, technical → baseline PAD
  5. Conversational arc: relative arousal change from previous state

Output: PadState + claim text for EmotionalEpisode creation. The episode gets full epistemic backing via the existing system.

Structs§

ExtractionResult
The result of structural emotion extraction from a text.

Enums§

ContextType
SpeechAct
StructuralEvent
A structural event detected in text.

Functions§

extract_emotion
Extract emotional state from text using structural signals.