Skip to content

LogicalGagan/Auto-Correct

Repository files navigation

AutoCorrect

Lightweight, offline autocorrect for Windows.

AutoCorrect fixes common typing mistakes as you type and stays out of the way in the system tray. It is designed to feel fast, local, and dependable instead of cloud-heavy or distracting.

What This Project Is

AutoCorrect is a system-wide Windows typing helper built for people who type quickly and make small mistakes often:

  • teh instead of the
  • somthing instead of something
  • wnat instead of want

The goal is simple: make desktop typing feel a little more like phone autocorrect, but without sending your text anywhere and without depending on paid APIs.

What It Uses

The project is built around a local typo-correction engine using symspellpy, plus a lightweight Windows desktop wrapper:

  • symspellpy for fast spelling suggestions
  • pynput for global key listening
  • pystray for the tray icon and tray menu
  • tkinter for the settings window
  • Pillow for icon generation and tray graphics

How It Works

The app listens for typing system-wide. When you press Space or Enter, it treats that as the end of a word.

Then it:

  1. reads the last typed word from its in-memory buffer
  2. checks whether the app is enabled
  3. sends the word through the local correction engine
  4. if a better correction is found, it erases the old word and types the corrected one

That means correction happens word by word, in real time, without scanning entire documents and without making internet requests.

Why It Feels Fast

The speed comes from the correction approach.

Instead of comparing a typo against every dictionary word one by one, the underlying engine uses a precomputed delete-based index. That lets it jump quickly to likely matches for misspelled words.

In practice, lookup is designed to behave like near-constant-time dictionary access for common use, which is why SymSpell is widely known for being extremely fast compared with traditional edit-distance spell checking.

Important nuance:

  • the full app is not literally O(1) end to end in the strict theoretical sense
  • there is still work for indexing, candidate lookup, filtering, and simulated retyping
  • but for typical desktop usage, the correction step is small and fast enough to feel immediate

That is the real reason this project works well as a background utility: it is lightweight enough to react as you type instead of feeling delayed.

Why This Approach Was Chosen

This project intentionally avoids:

  • cloud models
  • paid APIs
  • heavy background inference
  • online dependency for normal usage

That makes it:

  1. Lightweight Runs as a small local background utility instead of a heavy assistant.

  2. Fast Uses a local correction engine tuned for instant word-by-word fixes.

  3. Offline No cloud calls, no API bills, no internet required.

  4. System-wide Designed for everyday Windows typing, not just one editor or browser tab.

  5. User-controlled You can tune ignored words, custom replacements, startup behavior, and live settings from the tray app.

Features

  • real-time correction on Space and Enter
  • system-wide Windows listener
  • offline local correction
  • tray icon controls
  • branded settings window
  • ignored words list
  • custom replacements
  • startup control
  • settings import and export
  • live preview tab

Quick Install

For normal users, this is the path that matters:

  1. Open the repository on GitHub
  2. Click Releases
  3. Download the latest installer, such as AutoCorrect-Setup.exe
  4. Run the installer
  5. Launch AutoCorrect from the installer finish screen, Start Menu, or desktop shortcut

After that, AutoCorrect runs from the Windows system tray and you can turn it on or off from there.

How To Use

Once AutoCorrect is running:

  1. Type normally in Windows apps
  2. Press Space or Enter
  3. AutoCorrect fixes the last word when it recognizes a common typo

Use the tray icon to:

  • turn autocorrect on or off
  • open settings
  • enable launch at startup
  • quit the app

If The Tray Icon Is Missing

Windows often hides tray icons by default. If you do not see AutoCorrect right away:

  1. Look at the bottom-right corner of the taskbar near the clock
  2. Click the small ^ arrow to open hidden tray icons
  3. Find the AutoCorrect icon there
  4. Right-click it to open the menu

If you want it visible all the time, pin it from the Windows tray settings.

If The User Quit The App

If someone clicks Quit, AutoCorrect fully closes and stops correcting until it is launched again.

To run it again:

  1. Open the Windows Start Menu
  2. Search for AutoCorrect
  3. Click the app to start it again

If a desktop shortcut was created during install, the user can also start it from there.

If Launch at startup is enabled, it will also come back automatically the next time the user signs into Windows.

Trust And Privacy

  • no telemetry
  • no paid API dependency
  • no internet requirement
  • local settings only
  • local correction only

Current Limitations

  • It fixes typos, not full sentence meaning
  • Wrong-but-valid words can still slip through
  • Protected or elevated apps may block simulated typing
  • Very short words are corrected conservatively to avoid false positives

For Developers

If you want to run from source:

python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python main.py

Build the standalone app:

.\build.ps1

Build the installer:

  1. Build the standalone exe with .\build.ps1
  2. Open installer.iss in Inno Setup
  3. Compile the installer

Project Layout

  • main.py: app startup, tray integration, runtime wiring
  • injector.py: keyboard buffering and word replacement
  • corrector.py: local correction logic
  • settings.py: persistent settings and startup integration
  • ui.py: settings window
  • app_info.py: release metadata
  • tools/generate_icon.py: build-time icon generation
  • AutoCorrect.spec: PyInstaller spec
  • installer.iss: Inno Setup installer script

Contributing

Contributions are welcome. Start with CONTRIBUTING.md.

License

This project is released under the MIT License. See LICENSE.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors