Academy / Data & Machine Learning

Path 2 · Course 4 · For analysts and aspiring practitioners

NLP Fundamentals

Turn text into insight with Python, in code cells you can run and edit on the page: tokens and bag of words, TF-IDF classifiers, embeddings and semantic search, information extraction with regex and LLMs, transformers and few-shot classification, topic discovery, and responsible NLP in production.

By · Last updated

6 modulesAbout 5.5 hoursKnowledge check per moduleFinal assessment & certificatePython, pandas & basic ML

0 of 6 modules complete

Modules

  1. 1

    Text as data

    What NLP is used for, the practice dataset, tokenisation and normalisation, bag of words, stop words and n-grams, how settings change the vocabulary, and where classic NLP fits now that LLMs exist.

    45 min
  2. 2

    Text classification

    TF-IDF, a vectoriser-plus-model pipeline, inspecting learned words, error analysis and sentiment, a baseline and cross-validation, a word-counting sentiment scorer, and how many labels you need.

    50 min
  3. 3

    Embeddings and semantic search

    Why exact word matching falls short, cosine similarity, getting embeddings from an API, semantic search steps and the limits of embeddings, a runnable semantic search, and hybrid search with reranking.

    50 min
  4. 4

    Information extraction

    Regular expressions for precise patterns, named entity recognition, LLM extraction to JSON, validation and grounding checks, a product list as the simplest entity recogniser, extraction with a schema, and scoring an extractor field by field.

    50 min
  5. 5

    Transformers and LLMs for NLP

    From counts to transformers, attention, tokens and cost, zero- and few-shot classification, and choosing between classic NLP and LLMs, estimating token costs, comparing both on one test set, and small language models.

    50 min
  6. 6

    NLP in practice

    Topic modelling with NMF, tracking language over time, personal data and redaction, bias across languages and dialects, and running NLP in production, sizing an evaluation sample, and spotting language drift from unseen words.

    50 min

Frequently asked questions

What is NLP (natural language processing)?

NLP is the field of getting computers to work with human language — classifying, searching, extracting information from and generating text. Module 1: Text as data →

What is TF-IDF?

TF-IDF scores how important a word is to a document: frequent in that document but rare across the collection. Combined with a simple model, it makes a fast, explainable text classifier. Module 2: Text classification →

What are embeddings?

Embeddings turn text into lists of numbers so that similar meanings sit close together. They power semantic search, which finds relevant text even when the exact words differ. Module 3: Embeddings and semantic search →

Should I use classic NLP or an LLM?

Classic NLP is cheaper, faster and easier to control at scale; LLMs handle nuance and need little training data. Many real systems combine the two. Module 5: Transformers and LLMs for NLP →

How do you extract information from text?

Use regular expressions for precise patterns, named entity recognition for names, places and organisations, or an LLM to extract structured JSON — then validate the results. Module 4: Information extraction →