Introducing NER

Let's see what the NER tagger in spaCy can offer us.

We'll cover the following

We opened this chapter with a tagger, and we'll see another very handy tagger—the NER tagger of spaCy. As NER's name suggests, we are interested in finding named entities.

Named entities

What is a named entity? A named entity is a real-world object that we can refer to by a proper name or a quantity of interest. It can be a person, a place (city, country, landmark, famous building), an organization, a company, a product, dates, times, percentages, monetary amounts, a drug, or a disease name. Some examples are Alicia Keys, Paris, France, Brandenburg Gate, WHO, Google, Porsche Cayenne, and so on.

A named entity always points to a specific object, and that object is distinguishable via the corresponding named entity. For instance, if we tag the sentence "Paris is the capital of France," we parse "Paris" and "France" as named entities, but not the word "capital." The reason is that "capital" does not point to a specific object; it's a general name for many objects.

NER categorization is a bit different from POS categorization. Here, the number of categories is as high as we want. The most common categories are person, location, and organization and are supported by almost every usable NER tagger. In the following table, we see the corresponding tags:

Get hands-on with 1400+ tech skills courses.