algorembrant commited on
Commit
242dcb1
Β·
verified Β·
1 Parent(s): 725a1f8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +154 -144
README.md CHANGED
@@ -1,144 +1,154 @@
1
- # Autocorrect-Type
2
-
3
- ![License](https://img.shields.io/github/license/not-algorembrant/autocorrect-type)
4
- ![Repo Size](https://img.shields.io/github/repo-size/not-algorembrant/autocorrect-type)
5
- ![Last Commit](https://img.shields.io/github/last-commit/not-algorembrant/autocorrect-type)
6
- ![Rust](https://img.shields.io/badge/Rust-5-dea584)
7
- ![Markdown](https://img.shields.io/badge/Markdown-2-083fa1)
8
- ![TOML](https://img.shields.io/badge/TOML-1-9c4121)
9
-
10
- System-wide autocorrect for Windows. Runs silently in the background and fixes misspelled words as you type -- in any application (terminal, browser, Discord, search bar, etc.).
11
-
12
- Built with Rust + Windows API. No external APIs, no cloud dependencies, no AI -- fully offline and native.
13
-
14
- Handles 466k English words sourced from [english-words](https://github.com/dwyl/english-words).
15
- You can download the misspelling datasets [here](https://huggingface.co/datasets/algorembrant/generated-misspelling-words) and make sure to rename the file into `misspellings.txt` and place it on `*\data\` folder path.
16
-
17
- ## Features
18
-
19
- - **System-wide** -- works in any text input across your entire system
20
- - **500+ common misspellings** -- instant, high-confidence corrections (e.g. `teh` -> `the`)
21
- - **Smart spell checking** -- edit-distance algorithm catches unknown typos against a 466k-word dictionary
22
- - **Clipboard-based replacement** -- corrections happen instantly, no visible cursor movement
23
- - **Case-preserving** -- respects your capitalization (`TEH` -> `THE`, `Teh` -> `The`)
24
- - **System tray** -- toggle on/off, runs silently in background
25
- - **Lightweight** -- single `.exe`, no runtime dependencies, tiny memory footprint
26
-
27
- ## System Overview
28
-
29
- ```mermaid
30
- graph TD
31
- A[Keyboard Input] -->|WH_KEYBOARD_LL| B[hook.rs]
32
- B -->|Word buffer| C{Trigger key?}
33
- C -->|No| B
34
- C -->|Yes| D[spellcheck.rs]
35
- D -->|Known misspelling| E[Misspellings DB]
36
- D -->|Unknown word| F[Edit-Distance Engine]
37
- F -->|Match found| G[Dictionary - 466k words]
38
- E --> H[replacer.rs]
39
- G --> H
40
- H -->|Clipboard swap| I[Corrected Text]
41
- J[tray.rs] -->|Toggle / Exit| B
42
- K[main.rs] -->|Init| B
43
- K -->|Init| D
44
- K -->|Init| J
45
- ```
46
-
47
- ## Requirements
48
-
49
- ### To run the compiled `.exe`
50
-
51
- - Windows 10/11
52
-
53
- ### To build from source
54
-
55
- - [Rust toolchain](https://rustup.rs/) (stable)
56
-
57
- ## Build
58
-
59
- ```bash
60
- cargo build --release
61
- ```
62
-
63
- The binary will be at `target/release/autocorrect-type.exe`.
64
-
65
- ## Usage
66
-
67
- ### Run
68
-
69
- Double-click `autocorrect-type.exe` or run from terminal. The app appears in the system tray.
70
-
71
- ```bash
72
- # if it didnt open then
73
- cargo run --release
74
- ```
75
-
76
- ### Controls
77
-
78
- | Action | How |
79
- |---|---|
80
- | Toggle ON/OFF | `Ctrl + Alt + A` or right-click tray icon |
81
- | Exit | Right-click tray -> "Exit" |
82
-
83
- ### How it works
84
-
85
- 1. Type normally in any application
86
- 2. When you press **Space**, **Enter**, **Tab**, or punctuation, the app checks the word you just typed
87
- 3. If it is a known misspelling or a close match to a dictionary word, it is instantly replaced via the clipboard (no cursor flicker)
88
- 4. A small balloon notification shows the correction briefly
89
-
90
- ## How the correction works (no cursor flicker)
91
-
92
- Unlike typical autocorrect tools that backspace and retype characters visibly, this engine uses a clipboard-based approach:
93
-
94
- 1. Saves current clipboard contents
95
- 2. Sends backspaces to delete the misspelled word
96
- 3. Copies the correction to the clipboard
97
- 4. Simulates `Ctrl+V` to paste instantly
98
- 5. Restores the original clipboard
99
-
100
- This makes corrections appear instantaneous with no visible cursor movement.
101
-
102
- ## Customization
103
-
104
- ### Add words to the dictionary
105
-
106
- Add words to `data/user_words.txt` (one per line, auto-created next to the `.exe`). Restart the app after editing.
107
-
108
- ### Expand the misspellings database
109
-
110
- Edit `data/misspellings.txt`. Format: `misspelling=correction`, one per line. Lines starting with `#` are comments. The file is embedded at compile time.
111
-
112
- ## Project Structure
113
-
114
- ```text
115
- autocorrect-type/
116
- β”œβ”€β”€ Cargo.toml
117
- β”œβ”€β”€ Cargo.lock
118
- β”œβ”€β”€ LICENSE
119
- β”œβ”€β”€ README.md
120
- β”œβ”€β”€ .gitignore
121
- β”œβ”€β”€ src/
122
- | β”œβ”€β”€ main.rs
123
- | β”œβ”€β”€ hook.rs
124
- | β”œβ”€β”€ spellcheck.rs
125
- | β”œβ”€β”€ replacer.rs
126
- | └── tray.rs
127
- └── data/
128
- β”œβ”€β”€ words.txt
129
- └── misspellings.txt
130
- ```
131
-
132
- ## Citation
133
-
134
- ```bibtex
135
- @software{autocorrect_type,
136
- author = {Rembrant Oyangoren Albeos},
137
- title = {Autocorrect-Type},
138
- year = {2026},
139
- publisher = {Hugging Face},
140
- url = {https://huggingface.co/algorembrant/autocorrect-type}
141
- }
142
- ```
143
-
144
-
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ datasets: generated-misspelling-words
4
+ pipeline_tags:
5
+ - rust
6
+ - misspelling-words
7
+
8
+
9
+ ---
10
+
11
+ # Autocorrect-Type
12
+
13
+ ![License](https://img.shields.io/github/license/not-algorembrant/autocorrect-type)
14
+ ![Repo Size](https://img.shields.io/github/repo-size/not-algorembrant/autocorrect-type)
15
+ ![Last Commit](https://img.shields.io/github/last-commit/not-algorembrant/autocorrect-type)
16
+ ![Rust](https://img.shields.io/badge/Rust-5-dea584)
17
+ ![Markdown](https://img.shields.io/badge/Markdown-2-083fa1)
18
+ ![TOML](https://img.shields.io/badge/TOML-1-9c4121)
19
+
20
+ System-wide autocorrect for Windows. Runs silently in the background and fixes misspelled words as you type -- in any application (terminal, browser, Discord, search bar, etc.).
21
+
22
+ Built with Rust + Windows API. No external APIs, no cloud dependencies, no AI -- fully offline and native.
23
+
24
+ Handles 466k English words sourced from [english-words](https://github.com/dwyl/english-words).
25
+ You can download the misspelling datasets [here](https://huggingface.co/datasets/algorembrant/generated-misspelling-words) and make sure to rename the file into `misspellings.txt` and place it on `*\data\` folder path.
26
+
27
+ ## Features
28
+
29
+ - **System-wide** -- works in any text input across your entire system
30
+ - **500+ common misspellings** -- instant, high-confidence corrections (e.g. `teh` -> `the`)
31
+ - **Smart spell checking** -- edit-distance algorithm catches unknown typos against a 466k-word dictionary
32
+ - **Clipboard-based replacement** -- corrections happen instantly, no visible cursor movement
33
+ - **Case-preserving** -- respects your capitalization (`TEH` -> `THE`, `Teh` -> `The`)
34
+ - **System tray** -- toggle on/off, runs silently in background
35
+ - **Lightweight** -- single `.exe`, no runtime dependencies, tiny memory footprint
36
+
37
+ ## System Overview
38
+
39
+ ```mermaid
40
+ graph TD
41
+ A[Keyboard Input] -->|WH_KEYBOARD_LL| B[hook.rs]
42
+ B -->|Word buffer| C{Trigger key?}
43
+ C -->|No| B
44
+ C -->|Yes| D[spellcheck.rs]
45
+ D -->|Known misspelling| E[Misspellings DB]
46
+ D -->|Unknown word| F[Edit-Distance Engine]
47
+ F -->|Match found| G[Dictionary - 466k words]
48
+ E --> H[replacer.rs]
49
+ G --> H
50
+ H -->|Clipboard swap| I[Corrected Text]
51
+ J[tray.rs] -->|Toggle / Exit| B
52
+ K[main.rs] -->|Init| B
53
+ K -->|Init| D
54
+ K -->|Init| J
55
+ ```
56
+
57
+ ## Requirements
58
+
59
+ ### To run the compiled `.exe`
60
+
61
+ - Windows 10/11
62
+
63
+ ### To build from source
64
+
65
+ - [Rust toolchain](https://rustup.rs/) (stable)
66
+
67
+ ## Build
68
+
69
+ ```bash
70
+ cargo build --release
71
+ ```
72
+
73
+ The binary will be at `target/release/autocorrect-type.exe`.
74
+
75
+ ## Usage
76
+
77
+ ### Run
78
+
79
+ Double-click `autocorrect-type.exe` or run from terminal. The app appears in the system tray.
80
+
81
+ ```bash
82
+ # if it didnt open then
83
+ cargo run --release
84
+ ```
85
+
86
+ ### Controls
87
+
88
+ | Action | How |
89
+ |---|---|
90
+ | Toggle ON/OFF | `Ctrl + Alt + A` or right-click tray icon |
91
+ | Exit | Right-click tray -> "Exit" |
92
+
93
+ ### How it works
94
+
95
+ 1. Type normally in any application
96
+ 2. When you press **Space**, **Enter**, **Tab**, or punctuation, the app checks the word you just typed
97
+ 3. If it is a known misspelling or a close match to a dictionary word, it is instantly replaced via the clipboard (no cursor flicker)
98
+ 4. A small balloon notification shows the correction briefly
99
+
100
+ ## How the correction works (no cursor flicker)
101
+
102
+ Unlike typical autocorrect tools that backspace and retype characters visibly, this engine uses a clipboard-based approach:
103
+
104
+ 1. Saves current clipboard contents
105
+ 2. Sends backspaces to delete the misspelled word
106
+ 3. Copies the correction to the clipboard
107
+ 4. Simulates `Ctrl+V` to paste instantly
108
+ 5. Restores the original clipboard
109
+
110
+ This makes corrections appear instantaneous with no visible cursor movement.
111
+
112
+ ## Customization
113
+
114
+ ### Add words to the dictionary
115
+
116
+ Add words to `data/user_words.txt` (one per line, auto-created next to the `.exe`). Restart the app after editing.
117
+
118
+ ### Expand the misspellings database
119
+
120
+ Edit `data/misspellings.txt`. Format: `misspelling=correction`, one per line. Lines starting with `#` are comments. The file is embedded at compile time.
121
+
122
+ ## Project Structure
123
+
124
+ ```text
125
+ autocorrect-type/
126
+ β”œβ”€β”€ Cargo.toml
127
+ β”œβ”€β”€ Cargo.lock
128
+ β”œβ”€β”€ LICENSE
129
+ β”œβ”€β”€ README.md
130
+ β”œβ”€β”€ .gitignore
131
+ β”œβ”€β”€ src/
132
+ | β”œβ”€β”€ main.rs
133
+ | β”œβ”€β”€ hook.rs
134
+ | β”œβ”€β”€ spellcheck.rs
135
+ | β”œβ”€β”€ replacer.rs
136
+ | └── tray.rs
137
+ └── data/
138
+ β”œβ”€β”€ words.txt
139
+ └── misspellings.txt
140
+ ```
141
+
142
+ ## Citation
143
+
144
+ ```bibtex
145
+ @software{autocorrect_type,
146
+ author = {Rembrant Oyangoren Albeos},
147
+ title = {Autocorrect-Type},
148
+ year = {2026},
149
+ publisher = {Hugging Face},
150
+ url = {https://huggingface.co/algorembrant/autocorrect-type}
151
+ }
152
+ ```
153
+
154
+