Complete Natural Language Processing (NLP) Tutorial in Python! (with examples)

In this video we go through the major concepts in natural language processing using Python libraries! We use examples to help drill down the concepts. There is content in this video for all skill levels (beginners to experts). I originally recorded this video for the PyCon Conference.

GitHub repo:
YT Membership:

Some of the topics we cover:
– Bag-of-words
– Word vectors
– Stemming/Lemmatization
– Spell correction
– Transformer Architecture (Attention is all you need)
– State of the art models (OpenAI GPT, BERT)

Some of the libraries used:
– sklearn
– spaCy
– TextBlob

Hope you enjoy & let me know if you have any questions! Make sure to subscribe if you haven’t already :).

Follow me on social media!
Instagram |
Twitter |

If you are curious to learn how I make my tutorials, check out this video:

Practice your Python Pandas data science skills with problems on StrataScratch!

Join the Python Army to get access to perks!
YouTube –
Patreon –

*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.

Song at the end
good morning by Amine Maxwell
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream:
Music promoted by Audio Library

Video Timeline!

~~ NLP Fundamentals ~~
0:00 – Announcements!
1:12 – Video overview & timeline
3:06 – Bag of words (BOW) overview
4:42 – Bag of words example code! (sklearn | CountVectorizer, fit_transform)
11:20 – Building a text classification model using bag-of-words (SVM)
14:07 – Predicting new utterances classes using our model (transform)
16:02 – Unigram, bigram, ngrams (using consecutive words in your model)
19:28 – Word vectors overview
23:27 – Word vectors example code! (Using spaCy library)
28:10 – Building a text classification model using word vectors
34:04 – Predicting new utterances using our model

~~ Miscellaneous NLP Techniques ~~
40:42 – Regexes (pattern matching) in Python.
52:30 – Stemming/Lemmatization in Python (text normalization w/ NLTK library)
1:01:17 – Stopwords Removal (removing most common words from sentences)
1:05:56 – Various other techniques (spell correction, sentiment analysis, part-of-speech tagging).

~~ State-of-the-art Models ~~
1:12:45 – Recurrent Neural Networks (RNNs) for text classification
1:17:00 – Transformer architectures (attention is all you need)
1:21:00 – Writing Python code to leverage transformers (BERT | spacy-transformers)
1:25:00 – Writing a classification model using transformers/BERT
1:29:37 – Fine-tuning transformer models
1:31:16 – Bring it all together and build a high performance model to classify the categories of Amazon reviews!