Is there a method to extract all possible named entity types from a model in spaCy? You can manually figure it out by running on sample text, but I imagine there is a more programmatic way to do this? For example:
import spacy
model=spacy.load("en_core_web_sm")
model.*returns_entity_types*
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With