You can use the SpaCy natural language processing (NLP) package to extract named entities from text. Learn to use the SpaCy API and understand the conventions used in the SpaCy pacakge.
- [Instructor] In our next task,…we're going to extract entities…from Bill Clinton's inauguration speech.…For this we're going to use spacy.…You should install spacy…and also download its language model.…Let's load and parse the data.…So we import spacy,…and our model is spacy dot load of English.…
Spacy comes with models for English and German.…Other languages are in alpha state.…And our filename is path dot expand user of nltk data…corpora inaugural 1993 Clinton dot txt…and with open fname as fp data equal fp dot read.…And now we'll create a spacy document.…Doc equal nlp of data.…The doc object already contains what we want.…
For example, sentence is next of doc dot sents.…And we can print it.…We can iterate over the sentences and look at the tokens.…For token in the sentence, print…and we'll print the token and the entity type…format tok and tok dot ent type.…The convention in spacy is that…attribute without the underscore at the end is numeric,…and the one with underscore is textual.…
The document itself has ents for entities.…
- Working with Jupyter notebooks
- Using code cells
- Extensions to the Python language
- Markdown cells
- Editing notebooks
- NumPy basics
- Broadcasting, array operations, and ufuncs
- Folium and Geo
- Machine learning with scikit-learn
- Plotting with matplotlib and bokeh
- Branching into Numba, Cython, deep learning, and NLP
Skill Level Intermediate
1. Scientific Python Overview
2. The Jupyter Notebook
3. NumPy Basics
Manage environments5m 11s
6. Folium and Geo
7. NY Taxi Data
10. Other Packages
11. Development Process
Next steps1m 33s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.