Natural Language Processing with spaCy
Learn to parse text, extract named entities, measure word similarity, write matching rules and train spaCy models in Python through interactive exercises.
Unstructured text has to be parsed before information can be extracted from it: broken into tokens and sentences, with each word labeled. spaCy is a Python library designed for that work in production settings. You use it to parse documents, pick out named entities, compare meanings through word vectors, and write rules that pull exact terms and phrases out of raw text. When a model’s predictions miss on your own data, you also train it further.
What You Will Achieve
- Break raw text into tokens, lemmas and sentences, and tag each word’s part of speech and named entities
- Score how close in meaning two words, spans or documents are, and use those scores to categorize texts relevant to a topic
- Write pattern rules that pull exact terms and phrases out of raw text and feed them into a pipeline as entity labels
- Turn annotated examples into training data and retrain a model whose entity predictions fail on your own text
Program Overview
NLP and spaCy Basics
An opening look at natural language processing and its use cases, then the first steps of processing text with a spaCy pipeline.
- The Doc container and pipeline basics
- Tokenization, lemmatization and sentence segmentation
- POS tagging and named entity recognition
Linguistic Annotations and Word Vectors
Linguistic features spaCy attaches to each token, and how word vectors support similarity checks and topic-based text categorization.
- Word-sense disambiguation and dependency parsing
- Word vectors in the spaCy vocabulary, analogies and projection
- Semantic similarity for words, spans and docs
Pipelines, Rule-Based Matching and Model Training
Building and inspecting pipelines, extracting information with rules, and training models where they fail on real-world data, with evaluation at inference time.
- Adding and analyzing pipeline components
- EntityRuler, Matcher, PhraseMatcher and RegEx
- Training data format and annotation
- Training an existing NER model or one from scratch
Certificate Awarded (Paid)
Job Outlook
These skills are used wherever text must become structured data, such as pulling named entities out of documents, categorizing texts by topic and matching set phrases.
Good for: Python programmers who want to add entity extraction, similarity scoring and custom model training with spaCy to their own text projects.
Keep in mind: Although labeled intermediate, the course is also described as advanced, and it ends with training spaCy models on your own data, both from an existing model and from scratch.
Bottom line: A spaCy-centered course that pairs rule-based matching with model training, so learners practice both ways of pulling information out of text.
Frequently Asked Questions
How do the rule-based tools fit alongside trained models?
The third chapter shows how to add components to a spaCy pipeline, then uses EntityRuler, Matcher, PhraseMatcher and RegEx to extract terms by pattern. EntityRuler is also applied to named entity recognition, including with a blank spaCy model, so rules can label entities inside the same pipeline a model uses.
What happens when a pretrained spaCy model gets my data wrong?
The final chapter looks at real-world cases where spaCy models fail. It covers checking model performance on your own data, annotating examples in spaCy's training format, training an existing NER model further or a new model from scratch, and evaluating the result at inference time.
What can word vectors be used for in spaCy?
The second chapter extracts word vectors from a spaCy model vocabulary and works through analogies, vector operations and projections. It then finds similar words, measures similarity between docs and spans, and uses those similarity scores to categorize texts that relate to a given topic.


There are no reviews yet.