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
-
Joy (喜び)
- Weak: Serenity (穏やか)
- Moderate: Joy (喜び)
- Strong: Ecstasy (歓喜)
-
Trust (信頼)
- Weak: Acceptance (受容)
- Moderate: Trust (信頼)
- Strong: Admiration (称賛)
-
Fear (恐れ)
- Weak: Apprehension (不安)
- Moderate: Fear (恐れ)
- Strong: Terror (恐怖)
-
Surprise (驚き)
- Weak: Distraction (注意散漫)
- Moderate: Surprise (驚き)
- Strong: Amazement (驚嘆)
-
Sadness (悲しみ)
- Weak: Pensiveness (物思い)
- Moderate: Sadness (悲しみ)
- Strong: Grief (深い悲しみ)
-
Disgust (嫌悪)
- Weak: Boredom (退屈)
- Moderate: Disgust (嫌悪)
- Strong: Loathing (憎悪)
-
Anger (怒り)
- Weak: Annoyance (不快)
- Moderate: Anger (怒り)
- Strong: Rage (激怒)
-
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
-
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)
-
TypeScript Types (
src/types/smell.ts)- Extended
Smellinterface withEmotionsfield - Additional types for smell data processing
- Extended
-
Emotion Data (
src/lib/emotions.ts)- Complete emotion vocabulary as TypeScript objects
- Utility functions for emotion retrieval and filtering
- Multilingual support
-
Emotion Mapping (
src/lib/emotion-mapping.ts)- Automatic emotion suggestion from text analysis
- Japanese keyword mapping to emotions
- Utility functions for smell-emotion associations
-
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
-
Emotion-based Search
- Filter smells by emotion
- Browse by emotion category
-
Emotion Analytics
- Visualize emotion distribution across volumes
- Identify emotional patterns in Genji
-
Improved AI Analysis
- Use LLM to suggest more accurate emotions
- Context-aware emotion mapping
-
Emotion Network
- Visualize relationships between smells through shared emotions
- Explore emotion transitions across narrative
References
- Plutchik's Wheel of Emotions
- Odeuropa Emotion Vocabulary
- Robert Plutchik (1980). "A general psychoevolutionary theory of emotion"
- Japanese version: 感情マッピング技術ドキュメント
License
The emotion vocabulary is based on Plutchik's work and the Odeuropa project, both of which are publicly available resources.