Skip to content
Know.itKnow.it
Create an animated lesson
On request

This article is free to read. Creating a lesson uses your daily or stored credits; review the language and settings before starting.

How does autocorrect work?

TechnologyLesson on requestFree to readयह पेज हिंदी में पढ़ें

Quick answer

Autocorrect compares each typed word against a dictionary and a statistical model of language, then replaces or suggests the most likely intended word. It uses the keys you pressed, common typos, and surrounding context to guess your meaning, and it adapts over time to your personal vocabulary.

Autocorrect works by comparing what you type against a dictionary and a model of likely words, then fixing or suggesting corrections. It uses the keys you hit, common typos, and the surrounding words to guess what you most likely meant.

Step by step

  1. As you type, the system captures the exact sequence of keys you pressed, including any near-miss touches on the keyboard.
  2. It checks whether that string appears in its dictionary of known words, including common names and slang.
  3. If the word is missing, it generates candidate corrections by swapping, inserting, deleting, or replacing letters, and by considering keys adjacent to the ones you hit.
  4. A language model scores each candidate based on how often it appears in general text and how well it fits the words around it.
  5. The highest-scoring candidate is automatically substituted, or offered as a suggestion if the system is less confident.
  6. The system records your accepted or rejected corrections, gradually adjusting its personal dictionary and predictions.

Key things to understand

  1. It checks your typed word against a built-in dictionary of known words.
  2. If it's not found, it finds the closest valid words by spelling and by nearby keys.
  3. It weighs which correction is most likely given the surrounding words.
  4. Modern versions learn from your habits and use language models for context.
  5. The same technology powers predictive text, suggesting the next word before you type it.

Labelled diagram

  1. Typed input

    The raw sequence of keys you pressed, including errors and near-misses.

  2. Dictionary lookup

    Checks if the string matches a known word, name, or common abbreviation.

  3. Candidate generation

    Creates possible corrections by editing letters and considering nearby keys.

  4. Context scoring

    A language model ranks candidates by how well they fit the surrounding words.

  5. Output

    The top candidate is applied automatically or shown as a suggestion.

How autocorrect turns a typo into the intended word

Real-world examples

  • On an iPhone, typing 'teh' quickly becomes 'the' because the transposition is a common typo and 'the' is highly frequent.
  • In Google Docs, typing 'definately' underlines it in red and suggests 'definitely' after comparing against its dictionary and context.
  • On many phone keyboards, typing ‘im’ becomes ‘I’m’, because the apostrophe version is far more common in real messages.
  • Microsoft Word's autocorrect changes '(c)' to '©' by default, a symbol substitution that relies on a fixed pattern rather than context.

Common mistake

✗ Myth: Autocorrect always knows the correct spelling and will never change a word that is already correct.

✓ Fact: Autocorrect can alter valid words when its language model judges another word more likely in context, especially for names, technical terms, or slang. It is a probabilistic guess, not a perfect proofreader.

People also ask

Why does autocorrect change correct words?
Autocorrect changes correct words when its statistical model decides another word is more probable given the surrounding text. This often happens with proper nouns, technical jargon, or slang that are absent from its dictionary. The system may also misinterpret a valid word if the context resembles a common phrase, leading it to 'fix' something that was already right.
How does autocorrect learn new words?
Autocorrect learns new words primarily by observing the words you type and accept without correction. When you repeatedly type a term and reject the suggested change, the system adds it to your personal dictionary. Some systems also learn from your contacts, email, and documents, while others update their general dictionaries through aggregated, anonymized data from many users.
What is the difference between autocorrect and spell check?
Spell check flags words that are not in its dictionary and suggests corrections, but it does not change your text automatically. Autocorrect goes further by automatically replacing a suspect word with its best guess, often without asking. Spell check is diagnostic; autocorrect is active and can alter your writing as you type.
Why does autocorrect make mistakes?
It guesses the most likely intended word from limited clues. When your wording is unusual, a name, or slang, its best guess can be wrong — sometimes amusingly so.
How does autocorrect know what I meant?
It combines the keys you pressed, common misspellings, and the surrounding words, picking the correction the language model rates as most probable.
Can I make autocorrect smarter?
Yes — it adapts as you use it, learning words you type often. Adding names and terms to your dictionary stops it 'correcting' them.

Part of the guide: How AI Works →