Machine Learning Project · Live Demo

AI That Corrects
As You Type

Powered by Unigram, N-gram and BERT-style models. Real-time word correction with context awareness and edit-distance ranking.

Try It NowHow It Works
Scroll
Why Autocorrect

Three Models. One Goal.

Switch between three NLP algorithms and compare how each model corrects your text.

Autocorrect uses N-gram frequency to rank candidates by how often each word follows the previous word in real English text.

Real-time Correction

Corrections appear instantly as you type. Sub-150ms latency with efficient candidate generation using edit-distance 1–2.

🧠

Context-Aware N-gram

Bigram and trigram models use previous corrected words as context to select the most probable correction, not just the closest match.

📊

Accuracy Insights

Live stats track words checked, corrections made, and an estimated accuracy score. Every session builds a correction history.

Model · Dataset Reference
Model·N-gram Language Model (Bigram)
Dataset·Kaggle — 333,000+ English words (unigram_freq.csv)
Corpus·Peter Norvig big.txt — 222,663 word tokens
Word List·words.txt — verified English dictionary
Source·Google Web 1T Unigram Frequency Data
1–2
chars
Edit Distance
3
algorithms
Model Modes
<150
ms
Avg Latency
333K+
unigrams
Training Words
Live Demo

Try the Autocorrect Engine

Autocorrect
Machine Learning Project
Bigram context ranking — P(w2|w1) from Peter Norvig big.txt.
Word Checker
Press Enter to check
Model · N-gram Language Model (Bigram)Dataset · Kaggle — 333,000+ English words (unigram_freq.csv)Corpus · Peter Norvig big.txt — 222,663 word tokensWord List · words.txt — verified English dictionarySource · Google Web 1T Unigram Frequency Data
Sentence Autocorrect
Input
Ctrl+Enter to correct
1
Tokenise: Split input into individual words
2
Generate candidates: level_one_edits() — edit distance 1–2 from words.txt
3
Build context: Look at the previous corrected word w1
4
Score candidates: P(w2|w1) = (count(w1,w2)+1) / (count(w1)+V)
5
Pick best: Select candidate with highest conditional probability