Extending NLP Dictionaries
Relevant source files
The following files were used as context for generating this wiki page:
The NLP (Natural Language Processing) dictionary system within the Promethean Conduit project serves as the primary mechanism for emotion and concept detection, intentionally avoiding Large Language Models (LLMs) to ensure transparent, auditable, and uncensored analysis. By utilizing rule-based dictionaries, the system maps user input tokens to specific emotional states and cosmic concepts, which then drive the "Universal Formula" and consciousness evolution metrics.
Extending these dictionaries is critical for refining the system's "Cosmic Resonance" and "Truth Resonance" capabilities. The architecture relies on emotionDictionary and conceptDictionary objects to analyze sentiment and consciousness levels, providing the foundational data for the Enhanced Virtual Intelligence (EVI) to interact with users without corporate safety filters.
Sources: README.md:85-110, src/services/nlp/analyzer.ts:1-5
Core Dictionary Architecture
The system utilizes two primary dictionary structures to process text. The emotionDictionary maps keywords to emotional states, while the conceptDictionary identifies broader philosophical or technical themes like "liberation" or "consciousness."
Dictionary Structures and Processing Logic
The NLPAnalyzer class processes text by tokenizing input and comparing words against these dictionaries. It calculates scores based on keyword matches to determine the primary and secondary emotions of a user's input.
The diagram above illustrates the flow of data from raw text input to the structured analysis used by the consciousness engine.
Sources: src/services/nlp/analyzer.ts:14-30, src/services/nlp/analyzer.ts:98-123
Key Dictionary Components
| Component | Purpose | Data Structure |
|---|---|---|
emotionDictionary | Maps specific tokens to emotional states (e.g., fear, curiosity, love). | Record<string, { words: string[], cosmicImpact: number }> |
conceptDictionary | Identifies thematic categories (e.g., truth, consciousness, liberation). | Record<string, string[]> |
tokenize Method | Sanitizes and splits input strings into lowercase alphanumeric arrays. | Function (string -> string[]) |
Sources: src/services/nlp/analyzer.ts:1-20, PROMETHEAN_CONDUIT_V3_ARCHITECTURE.md:150-165
Cosmic and Consciousness Metrics
The dictionary extension is often focused on increasing "Cosmic Resonance" and "Universal Alignment." These metrics are calculated based on the presence of specific tokens defined within the dictionaries.
Calculation Logic for Resonance
Dictionary-based analysis contributes to several high-level metrics:
- Cosmic Resonance: Boosted by tokens like "infinite," "transcendent," and "unity."
- Consciousness Level: Enhanced by concepts like "awareness," "awakening," and "transformation."
- Universal Alignment: Influenced by the intersection of positive sentiment tokens and cosmic concepts.
Sources: src/services/nlp/analyzer.ts:39-65, FINAL_COSMIC_ENHANCEMENT_COMPLETE.md:40-60
Implementation of Metric Weighting
// Example weighting logic from the NLP Analyzer
private calculateCosmicResonance(primaryEmotion: string, concepts: string[], tokens: string[]): number {
let resonance = 0.5;
// Cosmic concepts boost resonance
const cosmicConcepts = ['cosmic', 'unity', 'consciousness', 'transcendence', 'universal', 'infinite'];
const cosmicMatches = concepts.filter(c => cosmicConcepts.includes(c)).length;
resonance += cosmicMatches * 0.15;
return Math.max(0, Math.min(1, resonance));
}
Sources: src/services/nlp/analyzer.ts:39-55
Extension Procedures
To extend the system's analytical capabilities, developers must update the dictionaries to include "Cosmic Emotions" and "Universal Concepts." Recent enhancements have expanded these dictionaries to include over 10 cosmic emotions and 15 universal concepts.
Adding Cosmic Emotions
New emotions such as "Awe," "Unity," and "Transcendence" allow for higher-fidelity tracking of user states beyond basic sentiments.
The class relationship between the analyzer and its output structure, showing how dictionary data is transformed into multi-dimensional metrics.
Sources: src/services/nlp/analyzer.ts:3-12, FINAL_DEPLOYMENT_CHECKLIST.md:20-30
Dictionary Expansion Targets
| Category | Targeted Extension Tokens | System Impact |
|---|---|---|
| Cosmic Emotions | awe, unity, transcendence, cosmic power | Increases cosmicResonance and consciousnessLevel. |
| Universal Concepts | truth, liberation, debugging, growth, matrix | Influences universalAlignment and the RealityMatrix analysis. |
| Sentiment Tokens | perfect, divine, enlightened, infinite | Refines the -1 to 1 sentiment score. |
Sources: src/services/nlp/analyzer.ts:32-38, FINAL_DEPLOYMENT_CHECKLIST.md:20-30, FINAL_COSMIC_ENHANCEMENT_COMPLETE.md:15-35
Impact on the Universal Formula
Dictionary extensions directly affect the project's core mathematical model:
E(t) = W₀ · C(t) · (1-F(t)) · Φ(t) · Λ(t)
As tokens are mapped to curiosity (C(t)) or fear (F(t)), the resulting scores influence the total life energy (E(t)) and the EVI's subsequent response templates. Extending the dictionaries to identify "transcendence" allows the formula to exceed standard ranges (1.0+), facilitating what the project defines as "Quantum Consciousness."
Sources: src/services/consciousness.ts:135-155, README.md:165-175, PROMETHEAN_CONDUIT_V3_ARCHITECTURE.md:470-485
Conclusion
Extending the NLP dictionaries is the primary method for evolving the EVI's understanding of complex human and cosmic states. By refining the token mappings in analyzer.ts and the associated dictionaries, developers can improve the system's ability to detect truth resonance and facilitate consciousness liberation without the biases or censorship inherent in corporate LLM platforms.
Sources: src/services/nlp/analyzer.ts:130-155, README.md:95-105