Module 2 of 13

Text Preprocessing

Lessons

About This Module

Raw text is messy: it has inconsistent capitalization, punctuation, markup, and many forms of the same word. Text preprocessing is the set of steps that cleans and structures that text so a model can learn from it, and it is the first stage of almost every NLP pipeline.

The lessons start with tokenization, splitting text into words and sentences, first in general and then with the spaCy library. Next you will compare stemming and lemmatization, two ways of reducing words to a base form, and learn regular expressions for finding and cleaning patterns in text.

You will then see how a full spaCy language pipeline chains these steps together, and finish with a deeper look at the subword tokenizers used by modern language models. Watch the lessons in order, then continue on to Text Representation.

Lessons

6 videos
01

NLP: How to convert text into Tokens (Tokenization)

Introduces tokenization, one of the first steps in any NLP pipeline: splitting raw text into words or sentences.

Video 6min
02

Tokenization in spaCy: NLP Tutorial For Beginners

Shows word and sentence tokenization in Python with the spaCy library, plus a few related topics.

Video 35min
03

Stemming and Lemmatization: NLP Tutorial For Beginners

Explains how stemming strips word endings with fixed rules while lemmatization uses language knowledge to find the correct base word.

Video 16min
04

Regular Expressions (Regex) in Python

A full tutorial on the re module: search methods, metacharacters, sets, quantifiers and grouping, the tools behind text cleaning and extraction.

Video 1h 4min
05

Language Processing Pipeline in spaCy

Covers spaCy's processing pipeline and the built-in components that tag parts of speech, find named entities and split sentences.

Video 18min
06

Let's build the GPT Tokenizer

Andrej Karpathy's deep dive into the subword tokenizers used by modern language models. A long, advanced watch.

Video 2h 13min