From the course: NLP with Python for Machine Learning Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
What are regular expressions? - Python Tutorial
From the course: NLP with Python for Machine Learning Essential Training
What are regular expressions?
- [Presenter] Now that we know how to read in messy text, we want to learn some basics for how to manipulate, search for or split that text. So in this lesson we're going to cover some basics on regular expressions. If you're new to regular expressions, a regular expression, or a regex for short is a text string used for describing a certain search pattern. So if you're familiar with wildcards for search, like if you wanted to search for any CSV file on your computer using *.csv, this is basically just a supercharged version of that. Regular expressions can take various forms that we'll experiment with in the next lesson, but to give you a very quick example of what I mean, this regular expression will just just search for the explicit "nlp" string within some other string. This isn't so much a search pattern as it is an explicit command for what we want to find. So if it was, "I love nlp" then this search pattern would just capture and return "nlp." Another way to identify the "nlp"…
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)
What are NLP and NLTK?4m 7s
-
(Locked)
NLTK setup and overview6m 15s
-
(Locked)
Reading in text data11m 41s
-
(Locked)
Exploring the dataset6m 56s
-
(Locked)
What are regular expressions?4m 8s
-
(Locked)
Learning how to use regular expressions8m 44s
-
(Locked)
Regular expression replacements6m 3s
-
(Locked)
Machine learning pipeline4m 45s
-
(Locked)
Implementation: Removing punctuation9m 10s
-
(Locked)
Implementation: Tokenization3m 37s
-
(Locked)
Implementation: Removing stop words4m 2s
-
(Locked)
-
-
-
-
-