
This lesson covers installing spaCy, pandas, and itables libraries, along with the en_core_web_md model.
To get started, upload the attached notebook file to Google Colab and run the cells in order
How to split text into sentences using spaCy, create an nlp object, and present the results in an interactive table format.
This lesson covers spaCy's text tokenization, highlighting that tokens may not always correspond to individual words, with examples like dates and punctuation treated as separate tokens.
How to use spaCy to identify and visualize part of speech tags for tokens, including sorting the data in an interactive table format.
Filtering out stop words and punctuation when processing text can enhance insights, especially in visualizations like word clouds, ensuring key themes stand out clearly.
This lesson demonstrates creating text spans in spaCy using token indices, visualizing data with itables, and understanding character-level positions.
How to visualize dependency parse trees using spaCy's displaCy tool, highlighting token relationships and sentence structure for effective text analysis.
This lesson demonstrates Named Entity Recognition using spaCy, highlighting entity visualization, categorization, and the process of identifying and labeling entities in text.
This lesson explains how to analyze token attributes, including checks for alphabetical characters, digits, punctuation, stop words, and case formatting using various testing methods.
This lesson explains spaCy's "like" attributes
This lesson explains spaCy token attributes, including dependency labels, lemmas, and morphological analysis, emphasizing cautious usage for effective information extraction and rule generation.
Remaining token attributes - part of speech tags, sentence start indicators, and shape,
This lesson demonstrates how to visualize subtrees using itables by extracting token information, applying HTML markup, and formatting sentences for enhanced clarity and presentation.
How to visualize token heads in sentences using the itables library, applying HTML font colors to distinguish relationships between tokens effectively.
The makers of spaCy say this:
"For complex tasks, it’s usually better to train a statistical entity recognition model. However, statistical models require training data, so for many situations, rule-based approaches are more practical. This is especially true at the start of a project: you can use a rule-based approach as part of a data collection process, to help you “bootstrap” a statistical model.
Training a model is useful if you have some examples and you want your system to be able to generalize based on those examples. It works especially well if there are clues in the local context. For instance, if you’re trying to detect person or company names, your application may benefit from a statistical named entity recognition model.
Rule-based systems are a good choice if there’s a more or less finite number of examples that you want to find in the data, or if there’s a very clear, structured pattern you can express with token rules or regular expressions. For instance, country names, IP addresses or URLs are things you might be able to handle well with a purely rule-based approach."
In other words, even the makers of spaCy recommend that you do as much as you can with rule-based approaches, especially at the start of a project. This is all the more true if you are just beginning to learn spaCy.
In my opinion, it is much easier to use rule based systems once you develop a solid understanding of the spaCy document object. And it is very easy to develop this understanding using the visualization technique I explain in this course.