30% off every book in our site-wide sale. Shop the sale

The Invisible NLP All Around You: Keyboards, Inboxes, and Voice

The Invisible NLP All Around You: Keyboards, Inboxes, and Voice

TL;DR: You will be able to explain how autocorrect, spam filters, email sorting, grammar checkers, and voice assistants work, and ask the privacy questions that matter for each.

This article is one Wisdom Nugget from What Is Natural Language Processing? by Trevor Stephenson.

You have probably already used Natural Language Processing today without realising it. You woke up, typed a message, and your phone quietly fixed a typo, suggested the next word, or completed your sentence. That quiet help is NLP, working invisibly. Let us start with autocorrect, one of the oldest and most familiar NLP applications. You type ‘teh’ and it becomes ‘the’. You type ‘restuarant’ and it becomes ‘restaurant’. How does it know?

By the end of this Nugget you will be able to explain autocorrect with edit distance and language models, predictive text and Smart Compose, spam filtering with embeddings, email classification, grammar checking with syntax parsing, and the full voice assistant loop from wake word to text-to-speech, including on-device versus cloud privacy.

The core idea

Autocorrect and predictive text are a perfect example of NLP that is most successful when you do not notice it. When it works, you just type faster with fewer errors. When it fails, the infamous autocorrect that changes ‘meeting’ to something embarrassing, you notice. Spam filters, email sorting, and grammar checkers share a common trait: they work on text you did not ask to process, but that you benefit from having processed. They reduce noise, organise information, and improve clarity. Voice assistants combine everything: speech processing, the full NLP pipeline, dialogue management, and speech generation. They show how NLP does not exist in isolation but as part of a larger system that interacts with the real world. When you think about building or buying NLP tools, these everyday examples are useful benchmarks: does the tool reduce friction like autocorrect does? Does it organise like email sorting? Does it improve quality like grammar checkers?

How it works

Section 1 (Figure 8.1) covers autocorrect (dictionaries, edit distance, language models, context), predictive text (next-word prediction, personalisation), and Smart Compose (phrase completion from email patterns and past emails). Section 2 (Figure 8.2) covers spam filters (rule-based evasion like ‘FR EE MO NEY’, machine learning on labelled corpora, embeddings for semantic similarity, personalisation from user labels), email sorting (classification into Primary, Promotions, Social, Updates), and grammar checkers (syntactic parsing, language models, tone detection, the authorship question). Section 3 (Figure 8.3) covers voice assistants: wake word detection on-device, ASR with acoustic and language models, homophones ‘to’, ‘two’, ‘too’, intent and entity extraction, action, TTS, dictation, and the four challenges (no visual feedback, ambiguity, privacy, accent and language diversity).

The tools

Tool 1: Explain autocorrect, predictive text, and Smart Compose. Early autocorrect used dictionaries and edit distance, a measure of how many letters you need to change to turn one word into another. ‘Teh’ is one swap away from ‘the’, so it is a likely correction. Modern autocorrect is smarter: it uses context and language models. Predictive text takes this further: as you type ‘How are’, your keyboard might suggest ‘you’, ‘you doing’, ‘you today’. This is a language model predicting the next word based on what you have typed so far and on patterns learned from millions of other sentences. It also personalises: it learns your vocabulary, your common phrases, your names. Smart Compose, like Gmail’s feature that suggests completions for entire phrases, uses even more context: you start typing ‘Thanks for reaching out, I will’, and it suggests ‘get back to you shortly.’ What makes autocorrect feel intelligent is not just dictionary lookup, but context awareness: ‘I need to book a table’ versus ‘I love to read a book’: in the first, ‘book’ is a verb; in the second, a noun.

Step by step

The end-of-chapter exercise as a numbered protocol, in order.

  1. For one day, log every autocorrect, predictive text, smart compose suggestion, and note correct vs incorrect and what context it used.
  2. Explain how a spam filter uses embeddings to catch lottery winner and you have won a prize as similar despite no shared words.
  3. Email sorting: how would you classify Your order has shipped with tracking vs 20 percent off with images? What features would the classifier use?
  4. Voice assistant pipeline: trace Hey Siri set timer for ten minutes from wake word detection, ASR, NLP, action, TTS, including privacy design on-device vs cloud and how accent bias arises. No time is stated in the book for this exercise.

Worked example

The book’s worked example is the autocorrect context test: ‘I need to book a table’ versus ‘I love to read a book’. In the first, ‘book’ is a verb; in the second, a noun. A good predictive keyboard knows that after ‘book a table’, the next words might be ‘for two’, while after ‘read a book’, the next words might be ‘about’ or ‘on’. It uses surrounding words to disambiguate. The voice example is the full loop: ‘Hey Siri, set a timer for ten minutes’ goes from wake word to ASR to intent set_timer with duration ten minutes to action to the spoken confirmation ‘Timer set for ten minutes’.

A real example from the book

Case Study – Chapter 8: DailyDriver App: Invisible NLP That Saves Time. No person age is given. DailyDriver productivity app integrates three invisible NLP features from Chapter 8. First, smart keyboard: user types teh meeting at L’Artusi tmrw, autocorrect uses edit distance plus language model to fix teh to the, tmrw to tomorrow, and keeps L’Artusi as a single token because the personal dictionary learned it. Predictive text suggests for two at 7pm after Book a table. Second, email triage: incoming messages classified into Primary, Receipts, Support. Spam filter uses embeddings to recognise lottery winner and you have won a prize as similar despite no shared words. It learns from the user marking promotions as not spam, personalising. Third, voice dictation for drivers: Hey DailyDriver, set reminder to call Alex about order W12345.

Mistakes to avoid

  • Judging autocorrect by dictionary lookup alone. Correction: modern autocorrect uses context and language models, not just edit distance.
  • Thinking spam filters only match keywords. Correction: embedding-based filters catch semantically similar phrases with no shared words.
  • Treating email sorting as magic. Correction: it is classification on tokens, embeddings, sender, subject, body language, and past behaviour.
  • Accepting grammar suggestions without asking why. Correction: good tools explain why, helping you learn, not just correct.
  • Ignoring where voice data goes. Correction: ask whether learning is on-device or in the cloud, and whether recordings can be deleted.
  • Assuming ASR works equally for all accents. Correction: training data has historically overrepresented certain groups, so accent bias is real.

What not to do

  • Do NOT judge autocorrect by dictionary lookup alone.
  • Do NOT assume a spam filter only matches keywords.
  • Do NOT accept grammar changes without asking why.
  • Do NOT ignore where your voice recordings go.
  • Do NOT assume ASR works equally well for every accent.
  • Do NOT speak ambiguously to a voice assistant and expect it to guess correctly without confirmation.

Low-energy mode

Log the next three autocorrect or predictive text suggestions you see, and note one that was right and one that was wrong. That counts.

If you freelance

This is one way to apply the idea, not a passage from the book. A freelancer can use the email triage idea on their own inbox: classify incoming messages by intent and let the classifier learn from marking promotions as not spam, so the important personal emails surface first.

How to know it worked

You logged a day of autocorrect, predictive text, and smart compose suggestions with correct vs incorrect and the context used. You explained the lottery winner embedding example. You classified two emails and named the features the classifier would use. You traced Hey Siri set timer for ten minutes from wake word to TTS with privacy design and accent bias.

Key takeaways

  • Autocorrect and predictive text are a perfect example of NLP that is most successful when you do not notice it.
  • Success measured not by noticing NLP, but by not noticing friction.
  • Your keyboard learns from what you type.
  • When it works, you just type faster with fewer errors.

Try it today

Do Exercise – Chapter 8: Invisible NLP today (no time stated in the book, see Exercise).

End of Chapter Exercise – Chapter 8: Invisible NLP. No time stated in the book.

  1. For one day, log every autocorrect, predictive text, smart compose suggestion, note correct vs incorrect and what context it used.
  2. Explain how a spam filter uses embeddings to catch lottery winner and you have won a prize as similar despite no shared words.
  3. Email sorting: how would you classify Your order has shipped with tracking vs 20 percent off with images? What features would the classifier use?
  4. Voice assistant pipeline: trace Hey Siri set timer for ten minutes from wake word detection, ASR, NLP, action, TTS, including privacy design on-device vs cloud and how accent bias arises.

Frequently asked questions

Why does trying harder not work here?
Trying harder to type perfectly fails here, because the chapter’s own point is that these tools exist to reduce friction, not to demand perfection from you. The fix the book gives is to let the invisible pipeline do its work and to judge it by whether it reduces friction, organises, or improves quality, while asking where your data goes.

How do I know it worked?
You logged a day of autocorrect, predictive text, and smart compose suggestions with correct vs incorrect and the context used. You explained the lottery winner embedding example. You classified two emails and named the features the classifier would use. You traced Hey Siri set timer for ten minutes from wake word to TTS with privacy design and accent bias.

What if it does not work?
If autocorrect changes a word wrongly, then check whether it used context or only edit distance. If spam slips through, then check whether the filter learned from your marking behaviour. If a voice assistant misunderstands, then check whether it was ASR, intent, entity, or context tracking that failed.

Get the book

Google Play eBookGoogle Play AudiobookBarnes & Noble

More from What Is Natural Language Processing?