Module 3 of 13

Text Representation

Lessons

About This Module

Machine learning models work with numbers, not words. Text representation is how you turn cleaned, tokenized text into numeric vectors a model can use, and the choice of representation shapes everything that follows.

The lessons begin with the simplest approach, one-hot encoding, then move to bag-of-words, which represents a document by the words it contains. Next comes TF-IDF, which weights each word by how distinctive it is, so that very common words count for less.

The module closes by looking at what these sparse representations miss, namely meaning and context, which motivates the dense word embeddings you will meet in a later module. Watch the lessons in order, then continue on to Language Models & N-grams.

Lessons

6 videos
01

Text Representation: Label & One Hot Encoding

Covers label encoding and one-hot encoding, two primitive ways of representing text as numbers. Rarely used on their own in NLP, but important to understand.

Video 15min
02

Text Representation Using Bag Of Words (BOW)

Walks through how bag-of-words works as a text representation technique in NLP, with a hands-on tutorial.

Video 33min
03

What is Bag of Words?

A short IBM Technology explainer on bag-of-words as a feature extraction technique for text.

Video 21min
04

Term Frequency Inverse Document Frequency (TF-IDF) Explained

Explains the TF-IDF algorithm, including how the term frequency and inverse document frequency parts combine into one score.

Video 9min
05

Text Representation Using TF-IDF

A hands-on tutorial showing how TF-IDF reduces the influence of very common English words compared with raw word counts.

Video 36min
06

The Revolution in NLP: Word Embeddings & Word2Vec Explained

Shows the big flaw of bag-of-words, that it ignores meaning and context, and introduces word embeddings as the fix.

Video 26min