Proposal for LeanType Developer: The .lea Unified Dictionary System (User + History + Main)
Introduction
This proposal introduces the .lea (LeanType Editable) system, a unified dictionary architecture designed to replace the current fragmented suggestion logic. Instead of managing Personal Dictionaries, Typing History, and Main .dict files as separate, often inaccessible entities, the .lea system merges them into a single, transparent, and fully editable framework. This approach empowers users with total control over their typing experience while maintaining the high performance required by modern keyboard engines.
The Core Vision: Unifying the Fragmented System
Currently, keyboard suggestion logic is split into three disconnected parts:
- Personal Dictionary: A simple UI for manual word entry.
- Typing History: A hidden, often binary "black box" that learns from the user.
- Main Dictionary: Static
.dict binary files that are difficult to edit or reverse.
The proposed .lea system eliminates this fragmentation by following a simple yet powerful formula:
User (Manual) + History (Learned) + Main (Logic) = .lea System
By unifying these components into a single .lea format, the keyboard gains a "Single Source of Truth" that is both human-readable and machine-optimized.
The .lea Format: Transparent, Editable, and Reversible
The .lea format is a text-based representation of the entire suggestion model. Unlike the one-way .dict files, .lea is designed for Bi-directional Conversion. It can be compiled into high-speed binary for the engine and decompiled back into text for the user to edit.
Unified Structure Example:
# .lea (LeanType Editable) Unified System
# Version: 1.0
# Logic: User + History + Main = .lea
# [User + Main Section] - Core Vocabulary & Manual Entries
word: hello, F: 255
word: world, F: 200
bigram: how are, F: 150
# [History Section] - Dynamically Learned Bigrams
# These are updated in real-time as the user types, yet remain fully editable.
bigram: i love, F: 240
bigram: i am, F: 210
bigram: see you, F: 180
# [Advanced Logic] - Text Expansion & Custom Triggers
# Integrated directly into the suggestion flow.
word: %cursor1%, F: %cursor2%
bigram: %cursor3% %cursor4%, F: %cursor5%
Key Advantages:
- Unified Logic: No more separate databases. Everything the keyboard "knows" or "learns" is stored in the
.lea structure.
- Full Editability: Users can open the
.lea file to prune unwanted history, adjust learned bigram frequencies, or bulk-import custom word lists.
- Reversibility: Unlike
.dict, which is a "dead-end" format, the .lea system ensures that the binary models used by the engine can always be exported back into editable text.
- Bigram-First Approach: The system treats word pairs as the primary unit of intelligence, bridging the gap between static vocabulary and dynamic typing habits.
- Flexible Migration & Compatibility: The
.lea format acts as a universal container. Users can import their existing personal dictionaries (simple word lists without bigrams) and seamlessly upgrade them by adding bigram associations later. It supports both standalone words (unigrams) and word pairs (bigrams) within the same file.
New Bigram-Centric UI Concept
To support this unified system, the "Personal Dictionary" UI must evolve into a Bigram Management Interface. Instead of just a list of words, the UI should reflect the relational nature of the .lea system.
Proposed UI Features:
- Relational Editing: When editing a word, the user immediately sees all associated bigrams (e.g., clicking "I" shows "I love", "I am", "I will").
- History Management: Users can directly see what the keyboard has "learned" (History) and manually adjust frequencies or delete incorrect bigram associations.
- Template Support: Integration of
%cursor% markers for advanced text expansion, allowing the keyboard to act as a powerful productivity tool.
- Legacy Support & Granular Export: Ability to import standard personal dictionary formats (simple
.txt or .csv word lists) and automatically convert them into the .lea structure. Users can also choose to export their full .lea model or just specific sections (e.g., only manually added words without the learned history).
Technical Implementation: The Hybrid Engine
To maintain performance while using a text-based source:
- Background Compilation: The engine treats the
.lea file as the source. Upon save, it compiles a temporary, high-speed binary cache for real-time typing.
- Dynamic Updates: As the user types, the engine updates the in-memory model and periodically flushes these "History" updates back to the
.lea text file.
- Cross-Platform Bridge: Because
.lea is a standardized text format, it can serve as a universal translator between different engine requirements (like LeanType's .dict and FUTO's .futo).
Conclusion
The .lea system represents a shift from "Keyboards that hide their logic" to "Keyboards that empower their users." By unifying User, History, and Main components into a single, reversible text-based format, LeanType can offer a level of transparency and customization that no other keyboard provides. This isn't just a new file extension; it's a new way for keyboards to think and learn alongside their users.
Prepared by LeanBitLab
Proposal for LeanType Developer: The
.leaUnified Dictionary System (User + History + Main)Introduction
This proposal introduces the
.lea(LeanType Editable) system, a unified dictionary architecture designed to replace the current fragmented suggestion logic. Instead of managing Personal Dictionaries, Typing History, and Main.dictfiles as separate, often inaccessible entities, the.leasystem merges them into a single, transparent, and fully editable framework. This approach empowers users with total control over their typing experience while maintaining the high performance required by modern keyboard engines.The Core Vision: Unifying the Fragmented System
Currently, keyboard suggestion logic is split into three disconnected parts:
.dictbinary files that are difficult to edit or reverse.The proposed
.leasystem eliminates this fragmentation by following a simple yet powerful formula:By unifying these components into a single
.leaformat, the keyboard gains a "Single Source of Truth" that is both human-readable and machine-optimized.The
.leaFormat: Transparent, Editable, and ReversibleThe
.leaformat is a text-based representation of the entire suggestion model. Unlike the one-way.dictfiles,.leais designed for Bi-directional Conversion. It can be compiled into high-speed binary for the engine and decompiled back into text for the user to edit.Unified Structure Example:
Key Advantages:
.leastructure..leafile to prune unwanted history, adjust learned bigram frequencies, or bulk-import custom word lists..dict, which is a "dead-end" format, the.leasystem ensures that the binary models used by the engine can always be exported back into editable text..leaformat acts as a universal container. Users can import their existing personal dictionaries (simple word lists without bigrams) and seamlessly upgrade them by adding bigram associations later. It supports both standalone words (unigrams) and word pairs (bigrams) within the same file.New Bigram-Centric UI Concept
To support this unified system, the "Personal Dictionary" UI must evolve into a Bigram Management Interface. Instead of just a list of words, the UI should reflect the relational nature of the
.leasystem.Proposed UI Features:
%cursor%markers for advanced text expansion, allowing the keyboard to act as a powerful productivity tool..txtor.csvword lists) and automatically convert them into the.leastructure. Users can also choose to export their full.leamodel or just specific sections (e.g., only manually added words without the learned history).Technical Implementation: The Hybrid Engine
To maintain performance while using a text-based source:
.leafile as the source. Upon save, it compiles a temporary, high-speed binary cache for real-time typing..leatext file..leais a standardized text format, it can serve as a universal translator between different engine requirements (like LeanType's.dictand FUTO's.futo).Conclusion
The
.leasystem represents a shift from "Keyboards that hide their logic" to "Keyboards that empower their users." By unifying User, History, and Main components into a single, reversible text-based format, LeanType can offer a level of transparency and customization that no other keyboard provides. This isn't just a new file extension; it's a new way for keyboards to think and learn alongside their users.Prepared by LeanBitLab