From the course: Natural Language Processing in Python
Unlock this course with a free trial
Join today to access over 26,400 courses taught by industry experts.
Assignment: CountVectorizer - Python Tutorial
From the course: Natural Language Processing in Python
Assignment: CountVectorizer
For your next assignment on Count Vectorizer, you have another message from Lexie Khan. And she says, hello, now that you've cleaned and normalized the book descriptions using pandas and spaCy, can you create a quick visualization to show the top 10 most common terms in the descriptions? Could you also share some of the less common terms that appear in multiple book descriptions? Thanks, Lexie. Your key objectives for this assignment are first to vectorize your cleaned and normalized text using count vectorizer. So you're going to take the output from the previous assignment and then use count vectorizer here to create a document term matrix. In this first step, you're just going to be using the default parameters. Then once you do that, the next step will be to modify those parameters to reduce the total number of columns. First, you're going to remove stop words, and then also you're going to set a minimum document frequency. From there, once you've updated your count vectorizer…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Section introduction59s
-
(Locked)
NLP pipeline2m 43s
-
(Locked)
Text preprocessing overview2m 35s
-
(Locked)
Assignment: Create a new environment1m 28s
-
(Locked)
Solution: Create a new environment3m 20s
-
(Locked)
Text preprocessing with pandas4m 19s
-
(Locked)
Demo: Text preprocessing setup6m 4s
-
(Locked)
Demo: Text preprocessing with pandas8m 14s
-
(Locked)
Pro tip: Create a function4m 25s
-
(Locked)
Assignment: Text preprocessing with pandas3m 22s
-
(Locked)
Solution: Text preprocessing with pandas8m 12s
-
(Locked)
Text preprocessing with spaCy1m 38s
-
(Locked)
Tokenization2m 5s
-
(Locked)
Lemmatization2m 42s
-
(Locked)
Stop words1m 17s
-
(Locked)
Parts of speech tagging2m 1s
-
(Locked)
Demo: Tokens, lemmas, and stop words8m
-
(Locked)
Pro tip: Use the apply method5m 59s
-
(Locked)
Demo: Parts of speech tagging9m 27s
-
(Locked)
Demo: Create an NLP pipeline6m 15s
-
(Locked)
Assignment: Text preprocessing with spaCy41s
-
(Locked)
Solution: Text preprocessing with spaCy7m 57s
-
(Locked)
Vectorization4m 45s
-
(Locked)
CountVectorizer in Python8m 4s
-
(Locked)
Demo: CountVectorizer5m 48s
-
(Locked)
Demo: CountVectorizer parameters5m 5s
-
(Locked)
Pro tip: Exploratory data analysis2m 13s
-
(Locked)
Assignment: CountVectorizer1m 16s
-
(Locked)
Solution: CountVectorizer7m 36s
-
(Locked)
Term frequency–inverse document frequency (TF-IDF)6m 30s
-
(Locked)
TF-IDF vectorizer in Python5m 8s
-
(Locked)
Demo: TF-IDF vectorizer4m 52s
-
(Locked)
Assignment: TF-IDF vectorizer1m 7s
-
(Locked)
Solution: TF-IDF vectorizer7m 38s
-
(Locked)
Key takeaways4m 13s
-
(Locked)
-
-
-
-
-