From the course: Natural Language Processing for Speech and Text: From Beginner to Advanced
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Rule-based: Regular expressions - Python Tutorial
From the course: Natural Language Processing for Speech and Text: From Beginner to Advanced
Rule-based: Regular expressions
- [Instructor] Regular expressions, or RegEx, are sequences of characters that form search patterns. There are many individual and combinations of patterns that are possible. Some of the fundamental patterns are literal pattern, where the exact character or string is specified. For example, capital letter A to find all capital As, and hello as a string to find all hello in lowercase. Meta characters like square bracket to define a set. For example, [aeiou] will match any vowels. Wildcard or dot to match any single character, except new line. For example, s.t will match sit, sat, and set. Dash sign to specify for ranges. For example, [a-z] will match any lowercase. And backslash to escape the meta character to match it literally. For example, \d matches any digits, and \w matches any word character. In natural language processing, regular expression is used for tokenization. If you remember in the first chapter, we implemented regular expression in NLTK for this. Text cleaning, pattern…
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)
Algorithms for natural language processing tasks2m 5s
-
(Locked)
Types of algorithms in natural language processing2m 50s
-
(Locked)
Rule-based: Regular expressions1m 51s
-
(Locked)
Regular expression tasks using the re library2m 42s
-
(Locked)
Rule-based: Rule-based parsing1m 34s
-
(Locked)
Parsing sentences into syntactic structures using context-free grammars (CFG) in NLTK2m 57s
-
(Locked)
Part-of-speech (POS) tagging using spaCy4m 32s
-
(Locked)
Statistical: Hidden Markov models (HMMs)1m 25s
-
(Locked)
Hidden Markov models (HMMs) for POS tagging in NLTK6m 17s
-
(Locked)
Statistical: Conditional random fields (CRFs)1m 4s
-
(Locked)
Statistical: Naive Bayes classifiers1m 4s
-
(Locked)
Machine learning: Support vector machines (SVMs)1m 24s
-
(Locked)
Classify text data using SVM8m 33s
-
(Locked)
Machine learning: Decision trees1m 35s
-
(Locked)
Classify the speech commands dataset using decision trees8m 5s
-
(Locked)
Machine learning: K-means clustering57s
-
(Locked)
K-means clustering for the movie reviews dataset3m 50s
-
(Locked)
Deep learning: Recurrent neural networks (RNNs)1m 30s
-
(Locked)
Text generation using recurrent neural networks (RNNs)8m 48s
-
(Locked)
Deep learning: Transformers1m 36s
-
(Locked)
Transfer learning in natural language processing (NLP)45s
-
(Locked)
Speech-to-text (STT) using wav2vec in the Transformers library8m 15s
-
(Locked)
Text-to-speech (TTS) using Tacotron and WaveGlow5m 11s
-
(Locked)
-