How rime/librime works
Main Components
Core Components:
• Input Processing Layer
• Key Event Handling
• ASCII Composition
• Chord Composition
• Segmentation
• Dictionary System
• Dictionary Management
• User Dictionary
• Preset Vocabulary
• LevelDB Storage
• Translation Layer
• Script Translation
• Table Translation
• Context-aware Translation
• Reverse Lookup
• Configuration System
• Schema Configuration
• YAML Processing
• Custom Settings
• Deployment Management
• Plugin System
• Plugin Interface
• External Modules Support
[User Interface Layer (Frontends)]
• ↕ API Layer
[Core Processing Layer]
• ↕
[Storage Layer]
Key Architectural Patterns to Emphasize
• Component-based architecture (shown in src/rime/component.h)
• Modular design with clear separation of concerns
• Plugin system for extensibility
• Service-oriented internal structure
Implementation Details
[Frontend Implementations]
• ↓
[Rime API (rime_api.h)]
• ↓
[Engine Core]
• Processor Chain
• Segmentors
• Translators
• Filters
• ↓
[Dictionary System]
• MARISA Trie
• LevelDB Storage
External Dependencies
Integration with:
• Boost
• OpenCC (for character conversion)
• LevelDB (storage)
• YAML-cpp (configuration)
• MARISA (dictionary)