---
title: "Named Entity Recognition (NER)"
description: "NER identifies people, organisations, and locations inside free-form text. Why it's essential for privacy detection in AI prompts and how Locke uses it locally."
url: "https://sonomos.ai/glossary/named-entity-recognition/"
source: "https://sonomos.ai/glossary/named-entity-recognition/"
---

# Named Entity Recognition (NER)

An NLP technique that identifies and classifies real-world entities — people, organisations, locations — within free-form text.

## In depth

Named Entity Recognition (NER) tags spans of text as belonging to entity classes: PERSON, ORG, LOCATION, DATE, MONEY, and so on. It is the bridge between unstructured text and structured fields. NER is statistical or model-based, not regex-based, so it generalises across formats: 'Jane Doe', 'J. Doe', and 'Doe, Jane' all resolve to the same PERSON tag. In a privacy-detection context NER is the layer that catches client names, witness identifiers, and organisation names that no fixed pattern could match.

## Examples

- Tagging "Smith was deposed in San Diego on March 14" as PERSON, LOCATION, DATE.
- Identifying organisation names in a contract draft so they can be tokenized before transmission.
- Recognising a patient's name when it appears alongside a clinical term, triggering a PHI relevance signal.

## How Locke handles named entity recognition (ner)

Locke's on-device detection runs local NER against the text in your composer. The model is bundled with Locke and executes on-device. Tagged entities feed into contextual matching: a PERSON near a litigation keyword is treated differently than a PERSON in casual conversation.

[See the product](https://sonomos.ai/locke/)

## Related terms

- Contextual Matching

  Detecting sensitive data by combining structural patterns with surrounding context, instead of relying on regex alone.
- Personally Identifiable Information (PII)

  Any information that can identify a specific person, either directly (name, SSN) or in combination with other data (zip code + birthdate).
- On-Device AI

  Running model inference or pre-processing entirely on the user's machine instead of sending data to a cloud service.

## Reading on this topic

- [PHI vs PII vs Personal Data: A Plain-English Compliance Glossary for 2026](https://sonomos.ai/blog/phi-vs-pii-vs-personal-data-glossary/)
- [What Is PII Redaction? A Plain-English Guide for AI Users](https://sonomos.ai/blog/what-is-pii-redaction-ai/)
