LexiFix is a high-performance, real-time typing companion that demonstrates the practical application of core Data Structures & Algorithms (DSA) in text processing. Built with a responsive, modern light-themed desktop GUI, it provides live prefix matching, spelling suggestions, phrase predictions, state history management, and an interactive tree visualizer.
The LexiFix interface is split into dynamic, color-coded modular dashboards designed for absolute clarity:
The central workspace containing the real-time editor, dynamic metrics, and modular analysis widgets.
An interactive canvas rendering the prefix tree (Trie) representation of the lexicon. It shows active search paths in blue, terminal words in green, and supports panning and zooming.
Real-time panels for Autocomplete suggestions, spell correction alternatives, and predictive word suggestions.
LexiFix implements optimized data structures to perform instant checks and predictions as you type:
| Engine / Component | Underlying Data Structure | Key Algorithm | Time Complexity | Space Complexity |
|---|---|---|---|---|
| Autocomplete |
Trie (Prefix Tree) |
DFS Prefix Retrieval | ||
| Dictionary Validation | HashMap |
Hash-bucket search | ||
| Spell Correction | Custom Dynamic Array | Levenshtein Distance (DP) | ||
| Phrase Suggestion | Directed Weighted Graph | Adjacency Map traversal |
|
|
| Undo / Redo | Double Stack
|
LIFO State caching |
Where:
-
$L$ = Length of the active prefix query -
$M, N$ = Lengths of compared words -
$V, E$ = Vertices (words) and Edges (transitions) in the phrase graph -
$S$ = Size of the history cache stack -
$\Sigma$ = Alphabet size
LexiFix/
├── .gitignore
├── README.md
└── LexiFix/
├── data/
│ └── dictionary.txt # Lexicon database containing default vocabulary
├── src/
│ ├── Main.java # Application bootstrap class
│ └── lexifix/
│ ├── model/
│ │ ├── TrieNode.java # Trie node containing character links & flags
│ │ └── WordEntry.java # Word wrapper carrying frequency metrics
│ ├── engine/
│ │ ├── Trie.java # Custom prefix tree implementation
│ │ ├── Dictionary.java # Lexicon file loader and parser
│ │ ├── AutocompleteEngine.java # Prefix search processor
│ │ ├── SpellChecker.java # Direct verification engine
│ │ ├── SpellCorrectEngine.java # Dynamic Programming corrector
│ │ ├── SuggestionEngine.java # Word recommendation interface
│ │ ├── BigramGraph.java # Adjacency Graph for phrase predictions
│ │ └── UndoRedoManager.java # State cache double-stack manager
│ └── ui/
│ ├── LexiFixGUI.java # Main Java Swing window application
│ └── TrieVisualizerPanel.java# Live graphics panel rendering the Trie
├── run.bat # Windows CLI compiler and launch script
└── run.sh # Unix/macOS CLI compiler and launch script
- Java Development Kit (JDK) 11 or higher must be installed on your machine and available in your environment variables.
Double-click the run.bat file in the LexiFix folder or launch it from PowerShell/CMD:
cd LexiFix
run.batGive execution permissions to the script, then execute it:
cd LexiFix
chmod +x run.sh
./run.sh- 🎨 Harmonic Color Palette: Sleek, low-contrast, light-themed panels built with curated HSL colors to ensure visual balance.
-
⚡ Debounced Inputs: Integrated
javax.swing.Timerdebounces input queries (120ms) to ensure the interface updates smoothly without lag during quick typing. -
📏 Dynamic DPI Scaling: An interactive font slider (
$10\text{px} - 28\text{px}$ ) that programmatically resizes layouts, buttons, card panels, and scrollbars on the fly. -
⌨️ Keyboard Hotkeys: Full compatibility with standard productivity bindings:
Ctrl + Zfor undo states andCtrl + Yfor redo states.
Developed as a semester project for the CSC211 Data Structures and Algorithms course.




