This site uses AI for smell information extraction and image generation. Please note that it may contain errors or inaccuracies. Learn more

Emotion Mapping Technical Document

Emotion Mapping - Plutchik's Wheel of Emotions

Overview

This document describes the emotion mapping feature that integrates Plutchik's Wheel of Emotions with the Genji Monogatari smell database.

About Plutchik's Wheel of Emotions

Plutchik's Wheel of Emotions is a psychological model that categorizes human emotions into 8 basic emotions, each with three levels of intensity:

8 Basic Emotions

  1. Joy (喜び)

    • Weak: Serenity (穏やか)
    • Moderate: Joy (喜び)
    • Strong: Ecstasy (歓喜)
  2. Trust (信頼)

    • Weak: Acceptance (受容)
    • Moderate: Trust (信頼)
    • Strong: Admiration (称賛)
  3. Fear (恐れ)

    • Weak: Apprehension (不安)
    • Moderate: Fear (恐れ)
    • Strong: Terror (恐怖)
  4. Surprise (驚き)

    • Weak: Distraction (注意散漫)
    • Moderate: Surprise (驚き)
    • Strong: Amazement (驚嘆)
  5. Sadness (悲しみ)

    • Weak: Pensiveness (物思い)
    • Moderate: Sadness (悲しみ)
    • Strong: Grief (深い悲しみ)
  6. Disgust (嫌悪)

    • Weak: Boredom (退屈)
    • Moderate: Disgust (嫌悪)
    • Strong: Loathing (憎悪)
  7. Anger (怒り)

    • Weak: Annoyance (不快)
    • Moderate: Anger (怒り)
    • Strong: Rage (激怒)
  8. Anticipation (期待)

    • Weak: Interest (興味)
    • Moderate: Anticipation (期待)
    • Strong: Vigilance (警戒)

Dyads (Combined Emotions)

Plutchik's model also includes combined emotions (dyads):

  • Love (愛): Joy + Trust
  • Optimism (楽観): Joy + Anticipation
  • Aggressiveness (攻撃性): Anger + Anticipation
  • Contempt (軽蔑): Anger + Disgust
  • Remorse (後悔): Disgust + Sadness
  • Disapproval (不承認): Sadness + Surprise
  • Awe (畏敬): Surprise + Fear
  • Submission (服従): Fear + Trust

Implementation

Files Created

  1. RDF Vocabulary (public/rdf/plutchik-emotions.ttl)

    • Turtle/RDF format of Plutchik's emotion vocabulary
    • Compatible with Odeuropa project standards
    • Includes multilingual labels (English and Japanese)
  2. TypeScript Types (src/types/smell.ts)

    • Extended Smell interface with Emotions field
    • Additional types for smell data processing
  3. Emotion Data (src/lib/emotions.ts)

    • Complete emotion vocabulary as TypeScript objects
    • Utility functions for emotion retrieval and filtering
    • Multilingual support
  4. Emotion Mapping (src/lib/emotion-mapping.ts)

    • Automatic emotion suggestion from text analysis
    • Japanese keyword mapping to emotions
    • Utility functions for smell-emotion associations
  5. Migration Script (scripts/add-emotions.ts)

    • Batch processing script to add emotion suggestions
    • Support for dry-run mode
    • Volume-specific processing

Usage

Running the Emotion Suggestion Script

# Dry run (preview changes without modifying files)
npx tsx scripts/add-emotions.ts --dry-run

# Process specific volume
npx tsx scripts/add-emotions.ts --volume=01

# Process all volumes
npx tsx scripts/add-emotions.ts

Using Emotion Functions

import { getEmotion, getEmotionLabel } from '@/lib/emotions';
import { suggestEmotionsForSmell, getSmellEmotions } from '@/lib/emotion-mapping';

// Get emotion details
const emotion = getEmotion('joy');
console.log(emotion.prefLabel.ja); // "喜び"

// Suggest emotions for a smell
const smell = {
  Effect: "心くるしうおほさるゝ",
  Quality: "つゆけき",
  // ... other fields
};
const suggestedEmotions = suggestEmotionsForSmell(smell);

// Get emotions with labels for display
const emotions = getSmellEmotions(smell, 'ja');

Data Structure

Each smell entry can now include an Emotions field:

{
  "id": "smell-01-006-001",
  "Smell_Word": "御にほひ",
  "Effect": "おほかたのやむことなき御おもひにてこの君をはわたくし物におもほしかしつき給事かきりなし",
  "Emotions": ["love", "admiration", "joy"],
  ...
}

Emotion Keyword Mapping

The system uses Japanese keywords to automatically suggest emotions:

Joy Family

  • Keywords: 喜, 嬉, 楽, 幸, 悦
  • Emotions: joy, serenity, ecstasy

Sadness Family

  • Keywords: 悲, 哀, 憂, 寂
  • Emotions: sadness, pensiveness, grief

Fear Family

  • Keywords: 恐, 怖, 畏
  • Emotions: fear, apprehension, terror

Disgust Family

  • Keywords: 嫌, 厭, 忌
  • Emotions: disgust, boredom, loathing

Genji-Specific Emotions

  • あはれ (empathy/pathos) → sadness, pensiveness
  • もの哀し (melancholy) → sadness, pensiveness
  • 物憂 (melancholy) → sadness, boredom

UI Integration

Emotions are displayed in the SmellDetail component as badges:

  • Located after the Effect field
  • Displayed with heart icon
  • Shows emotion labels in user's language
  • Includes intensity information on hover

Future Enhancements

  1. Emotion-based Search

    • Filter smells by emotion
    • Browse by emotion category
  2. Emotion Analytics

    • Visualize emotion distribution across volumes
    • Identify emotional patterns in Genji
  3. Improved AI Analysis

    • Use LLM to suggest more accurate emotions
    • Context-aware emotion mapping
  4. Emotion Network

    • Visualize relationships between smells through shared emotions
    • Explore emotion transitions across narrative

References

License

The emotion vocabulary is based on Plutchik's work and the Odeuropa project, both of which are publicly available resources.