Natural Language ProcessingNLTK 3.10 · scikit-learn 1.9 · gensim 4.4 · TensorFlow 2 / Keras · NumPy · Python 3.12 or 3.13
Dashboard
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
52 small wins to finish your pathNext lesson →

NLP use cases

An NLP use case is a task in which a program reads or writes human language, such as correcting spelling, suggesting a reply, translating, answering a question or classifying a message.

Last updated: 07 Oct, 2026

The Natural language processing (NLP) overview showed why text has to become vectors. The video then opens the apps used every day and points at the NLP inside each one.

Spotting NLP in everyday apps

  • Spelling correction in Gmail. Typing "I wanted to clarify about the data science coarse" gets "coarse" corrected to "course": the model knows which word fits the sentence.
  • Smart Compose. Gmail suggests how to finish the sentence as you type, and you accept it with one key.
  • Smart replies on LinkedIn. Under a message, two chips such as "Yes, interested" and "No thanks" offer a whole reply in one click.
  • Google Translate. "How are you" becomes Arabic, then Hindi: क्या हाल है (kya haal hai). Posts on LinkedIn carry a See translation link that does the same in place.
  • Search. A query for a person's name returns their pages, images and videos, ranked by how well the text around them matches the query.

Browsing NLP tasks and models

Hugging Face tasks and voice assistants · from the Complete NLP Machine Learning in One Shot video · 19:31 to 21:22

Companies research these tasks in the open. Hugging Face hosts models for question answering, summarisation, text classification and translation, with a large and growing number of models for each, and organisations such as Google AI, Intel, SpeechBrain, Microsoft and Grammarly publish models there. All of them take text in and perform a task on it.

Voice assistants are the last example. Alexa controls an AC and the lights, and Google Assistant answers "Hey Google, do I have any doctor appointments tomorrow?" by searching the calendar: "Sorry, I can't find anything on your calendar that matches that."

Grouping the tasks by what goes in and out

The apps look different, but their tasks come in a few shapes. Knowing the shape tells you which kind of model to build:

Four shapes of NLP task: text to one label such as spam, text to a label per word such as POS tags for Taj Mahal is a beautiful Monument, text to new text such as How are you translated to kya haal hai, and speech to an action such as switching off the AC.
  • Text to one label is text classification: spam or ham, a positive or negative review. Parts 3 to 5 build these with bag of words, TF-IDF and Word2Vec, and part 7 with an LSTM.
  • Text to a label per word is tagging: each word gets a part of speech or an entity type, as in Parts of speech (POS) tagging and Named entity recognition (NER).
  • Text to new text is sequence to sequence: translation, summarisation, a suggested reply, an answer to a question. Encoder-decoder models and transformers in parts 8 to 10 do this.
  • Speech to an action is a pipeline: speech recognition turns the audio into text, an NLP model finds what is asked, and the device acts. NLP is the middle step.

Text classification vs tagging vs generation

Text classificationTaggingGeneration (sequence to sequence)
OutputOne label for the whole textOne label per tokenNew text, token by token
Example"You won a lottery" → spamTaj → NNP, Mahal → NNP"How are you" → "kya haal hai"
Classic approachTF-IDF + naive Bayes or logistic regressionA trained tagger (NLTK's perceptron)Encoder-decoder RNN with attention
Today's approachA fine-tuned BERTA fine-tuned BERT, one label per tokenA transformer: decoder-only (GPT) or encoder-decoder (T5)

Where you use NLP at work

  • Routing support tickets: classify each message into billing, delivery or technical, so it reaches the right team.
  • Reading documents: pull names, dates, amounts and places out of invoices or contracts with named entity recognition.
  • Searching a knowledge base: match a question against help articles and show the best answer.
Watch out. Finding images of a person from a text query is retrieval: the search engine matches the query against the text around existing images. Generating a new image from text is a different task, done by diffusion models. Name the shape of a task before choosing a model for it.
Try it yourself
  • Write the input and the output for Gmail's spelling correction and for LinkedIn's smart replies, then say which of the four shapes each one is.
  • Open Google Translate, translate "How are you" into Hindi and back into English, and note whether the round trip gives the same sentence.
  • Pick one task from your own work that reads text and decide whether it is classification, tagging or generation.

You understood something today that you didn't yesterday.