Named entity recognition examples and how to label entities cleanly

For experts4 min read

Named entity recognition examples show the task clearly: find the names of people, organisations, places, dates and amounts in a text, and give each one a category. This guide covers how entities are marked, with a small data sample, and the edge cases that cause disagreement.

What named entity recognition is

Named-entity recognition is an information extraction task that finds mentions of named entities in unstructured text and assigns each one to a predefined category. Common categories include person, organisation, location, time expressions, quantities, monetary values and percentages.

Source: Named-entity recognition, Wikipedia(opens in a new tab)

Named entity recognition examples in text

The standard textbook sentence is Jim bought 300 shares of Acme Corp. in 2006. Tagged, Jim is a person, Acme Corp. is an organisation and 2006 is a time. Some schemes also mark 300 as a quantity.

Text spanLabel
JimPERSON
300QUANTITY
Acme Corp.ORGANISATION
2006DATE

How the labels are stored

Tools record each entity as a start and end position in the text, counted in characters, together with the label. This invented record shows the same sentence.

JSON
{  "text": "Jim bought 300 shares of Acme Corp. in 2006.",  "entities": [    {"start": 0, "end": 3, "label": "PERSON"},    {"start": 11, "end": 14, "label": "QUANTITY"},    {"start": 25, "end": 35, "label": "ORG"},    {"start": 39, "end": 43, "label": "DATE"}  ]}

The start is the first character and the end is the position after the last character. In practice you select the words with the mouse and the tool fills the numbers. The detail matters because a stray space inside your selection shifts the offsets and can make the label fail a check.

A routine for labelling entities

  1. Read the guideline: label list, nesting rules and what counts as a mention.
  2. Read the text once without labelling.
  3. Highlight each mention and choose its category.
  4. Label every mention of the entity, including repeats.
  5. Reread the text for missed names, especially in lists and headings.
  6. Check that spans do not include extra spaces or punctuation.

Edge cases that cause disagreement

CaseQuestionCommon rule
TitlesIs Dr. part of the person?Often excluded, but check the guideline
Organisation names that contain placesBank of Kenya: place or organisation?Label the whole as an organisation
Nested namesUniversity of Ghana, LegonOuter span as organisation, unless nesting is allowed
PronounsHe, she, theyNot labelled in most schemes
NicknamesThe Big AppleLabel if the guideline treats it as a place
PossessivesAda's phoneExclude the 's
ProductsiPhone, LandcruiserDepends on whether a product class exists

Ambiguity you will meet

The word Jordan can be a person, a country or a brand. Context decides. Washington could be a city, a state or a person. If the context cannot settle it, use the unclear label if there is one, and flag it. Do not use outside knowledge about the document that the text does not support.

Entities in other languages follow the same rules, with extra care for names that look like ordinary words. In some languages a person's name is also a common noun, and capital letters give no help. A speaker of the language will usually spot these at once.

What reviewers check

  • Missed entities, which matter most because the model learns that they are not there.
  • Wrong boundaries: for example, labelling Acme instead of Acme Corp.
  • Wrong categories: person labelled as organisation.
  • Inconsistency: the same name labelled differently in two places.

Aim for steady habits rather than speed. A common mistake is to skip repeated names in a long text because they seem obvious, and those misses add up across thousands of documents.

A second example with trickier text

Read this sentence: On 3 March, Dr. Okafor flew from Lagos to Nairobi for the Kenya Bank conference, paying 450 dollars. A typical scheme marks 3 March as a date, Okafor as a person (with Dr. excluded or included by rule), Lagos and Nairobi as locations, Kenya Bank as an organisation despite the place word, and 450 dollars as money.

Notice the choices. Kenya is not labelled as a location on its own, because it is part of the organisation name. If the guideline allowed nested labels, it might be. This is exactly the kind of case that two annotators resolve differently when the rule is silent, so write down your choice and keep to it.

Long documents and fatigue

In a long text, the second half gets less attention. A trick that helps is to work in passes: read once for people, once for places, once for organisations and amounts. It feels slower, yet it often finds more entities per hour than a single pass, because you hold one category in mind at a time.

If the tool shows a count of entities, compare it with your expectation. A news article of a few hundred words with only two labels is a warning that you missed things. Go back and check.

Curatrain's experts do labelled data with written reasons. Linguists and subject experts take graded tests, and matches are made only to jobs whose tests they have passed.