A sophisticated autocorrect and suggestion system for Braille input using the QWERTY keyboard format. This project aims to improve the typing experience for visually impaired individuals by providing real-time suggestions, auto-correction, and visual feedback.
- Efficient Word Lookup: Uses a Trie data structure for fast dictionary searches
- Similarity Matching: Implements Levenshtein distance algorithm optimized for Braille cells
- Learning Mechanism: Improves suggestions based on user's previous inputs
- Real-time Suggestions: Optimized for speed to support large dictionaries
- Auto-replace Options: Shows top 3 suggestions for quick selection
- Clone the repository
git clone https://github.com/akash-kumar-dev/braille-autocorrect.git
cd braille-autocorrect
- Install dependencies
npm install
- Run the development server
npm run start
- Trie: For efficient dictionary storage and prefix matching
- Levenshtein Distance: For finding similar words, optimized for Braille cells
-
Word Suggestion:
- First attempts exact matching using the Trie
- If no exact match, finds similar words using Levenshtein distance
- Ranks suggestions by similarity and user frequency
- Returns the top N suggestions
-
Learning Mechanism:
- Tracks word usage frequency
- Prioritizes frequently used words in ambiguous cases
- Adapts to user's typing patterns over time
The system uses the following key mapping for Braille dots:
- D → Dot 1 (top left)
- W → Dot 2 (middle left)
- Q → Dot 3 (bottom left)
- K → Dot 4 (top right)
- O → Dot 5 (middle right)
- P → Dot 6 (bottom right)
- Type using the D, W, Q, K, O, P keys to input Braille dots
- Press Space to complete a cell
- See the Braille visualization and English translation update in real-time
- Press Tab to cycle through auto-replace options
- Press Enter to select the highlighted suggestion
-
Input Parsing:
- QWERTY keys (D, W, Q, K, O, P) are mapped to Braille dots (1-6)
- Multiple keys pressed simultaneously form a single Braille cell
- Cells are separated by spaces
-
Suggestion Generation:
- First attempts exact matching using the Trie
- If no exact match, finds similar words using Levenshtein distance
- Ranks suggestions by similarity and user frequency
- Returns the top N suggestions
-
Learning Mechanism:
- Tracks word usage frequency
- Prioritizes frequently used words in ambiguous cases
- Adapts to user's typing patterns over time