The statistical pipeline components like ner provide their labels under .labels:
import spacy
nlp = spacy.load("en_core_web_sm")
nlp.get_pipe("ner").labels
Answer from aab on Stack OverflowspaCy
spacy.io › api › entityrecognizer
EntityRecognizer · spaCy API Documentation
If your entities are long and characterized by tokens in their middle, the component will likely not be a good fit for your task. Predictions will be saved to Doc.ents as a tuple. Each label will also be reflected to each underlying token, where it is saved in the Token.ent_type and Token.ent_iob ...
spaCy
spacy.io › usage › linguistic-features
Linguistic Features · spaCy Usage Documentation
The standard way to access entity annotations is the doc.ents property, which produces a sequence of Span objects. The entity type is accessible either as a hash value or as a string, using the attributes ent.label and ent.label_. The Span object acts as a sequence of tokens, so you can iterate over the entity or index into it.
Videos
Top answer 1 of 2
23
The statistical pipeline components like ner provide their labels under .labels:
import spacy
nlp = spacy.load("en_core_web_sm")
nlp.get_pipe("ner").labels
2 of 2
4
This might not be the most general answer, but for en_core_web_sm this returns the named entity types.
model = spacy.load("en_core_web_sm")
list(model.__dict__['_meta']['accuracy']['ents_per_type'].keys())
['ORG', 'CARDINAL', 'DATE', 'GPE', 'PERSON', 'MONEY', 'PRODUCT', 'TIME', 'PERCENT', 'WORK_OF_ART', 'QUANTITY', 'NORP', 'LOC', 'EVENT', 'ORDINAL', 'FAC', 'LAW', 'LANGUAGE']
Kaggle
kaggle.com › code › curiousprogrammer › entity-extraction-and-classification-using-spacy
Entity Extraction and Classification using SpaCy
Checking your browser before accessing www.kaggle.com · Click here if you are not automatically redirected after 5 seconds
Restack
restack.io › p › entity-recognition-answer-spacy-entity-types-list-cat-ai
Spacy Entity Types List | Restackio
To effectively implement Named ... entities within it. The following sections will delve into the specifics of utilizing SpaCy for NER, including the available entity types and how to customize the model for your needs....
spaCy
spacy.io › usage › spacy-101
spaCy 101: Everything you need to know · spaCy Usage Documentation
Label: Entity label, i.e. type.
spaCy
spacy.io › usage › training
Training Pipelines & Models · spaCy Usage Documentation
Structured sections. The config is grouped into sections, and nested sections are defined using the . notation. For example, [components.ner] defines the settings for the pipeline’s named entity recognizer.
spaCy
spacy.io › api › data-formats
Data formats · spaCy API Documentation
Tokens outside an entity are set ... by the BILUO marker. For example "B-ORG" describes the first token of a multi-token ORG entity and "U-PERSON" a single token representing a PERSON entity....
Analytics Vidhya
analyticsvidhya.com › home › custom named entity recognition using spacy v3
Custom Named Entity Recognition using spaCy v3 - Analytics Vidhya
October 14, 2024 - When we use `nlp` (spacy model object) on a text, spaCy first tokenizes the text to produce a `Doc` object, which is then processed in the next stages in the pipeline. The pipeline used by the default models consists of a tagger stage, a parser stage, and an entity recognizer(ner) stage.
Analytics Vidhya
analyticsvidhya.com › home › named entity recognition (ner) in python with spacy
Named Entity Recognition (NER) in Python with Spacy
May 1, 2025 - It has built-in methods for Named Entity Recognition. Spacy has a fast statistical entity recognition system. We can use spacy very easily for NER tasks. Though often we need to train our own data for business-specific needs, the spacy model general performs well for all types of text data.
Dataknowsall
dataknowsall.com › blog › ner.html
An Accessible Guide to Named Entity Recognition
March 5, 2024 - PERCENT: Percentage, including ”%“. MONEY: Monetary values, including unit. QUANTITY: Measurements, as of weight or distance. ORDINAL: “first”, “second”, etc. CARDINAL: Numerals that do not fall under another type. There are many libraries to choose from; my tool of choice these days is SpaCy 1.