Okay, let's clarify what "entities in spaCy" usually refers to.
When people talk about "entities in spaCy," they typically mean the types of named entities that spaCy's standard, pre-trained models (like the English models en_core_web_sm, en_core_web_md, en_core_web_lg) are trained to recognize. These models are often trained on datasets like OntoNotes 5.
The number of these standard entity types is 18.
Here is the list of these 18 standard entity types and their descriptions, as recognized by many of spaCy's default English models:
- PERSON: People, including fictional.
- NORP: Nationalities, religious or political groups.
- FAC: Buildings, airports, highways, bridges, etc.
- ORG: Companies, agencies, institutions, etc.
- GPE: Countries, cities, states.
- LOC: Non-GPE locations, mountain ranges, bodies of water.
- PRODUCT: Objects, vehicles, foods, etc. (Not services.)
- EVENT: Named hurricanes, battles, wars, sporting events, etc.
- WORK_OF_ART: Titles of books, songs, films, etc.
- LAW: Named documents made into laws.
- LANGUAGE: Any named language.
- DATE: Absolute or relative dates or periods.
- TIME: Times smaller than a day.
- PERCENT: Percentage, including "%".
- CARDINAL: Numerals that do not fall under other types.
- ORDINAL: "first", "second", etc.
- MONEY: Monetary values, including units.
- QUANTITY: Measurements, as of weight or distance.
Important Considerations:
- This list refers to the standard set for models trained on OntoNotes, which are common for English.
- Models for other languages might have a different set of entity types.
- You can train spaCy on custom datasets to recognize any entity types you define. The number and list would then depend entirely on your training data.
- The question could also be interpreted as "how many individual entity spans can spaCy find in a text?". This number is not fixed; it depends entirely on the content and length of the text being processed.
So, while spaCy is capable of recognizing an infinite variety of individual entities across texts and can be trained to recognize custom types, the common answer regarding the number of standard types is 18.