What is named entity recognition?
The AI Glossary
In our classes, we often pause to explain the ideas behind AI and the language used to describe it. These posts grew out of those conversations. They’re for anyone who would like to understand AI better, with no technical background assumed.
Named entity recognition, usually shortened to NER, finds particular kinds of information in text and labels them. A system might identify people, organizations, dates and places. In clinical text, the categories may include medications, diagnoses or investigations. The categories are chosen for the task; they are not a universal list.
Consider “Alex started metformin on Monday.” An NER system could mark “Alex” as a person, “metformin” as a medication and “Monday” as a date expression. Each marked piece is a text span: the exact sequence of words to which the label applies.
That is useful, but it is only part of interpreting the sentence. Finding a medication name does not establish the dose, whether the patient actually took it or whether it remains current. “Metformin was considered but not prescribed” contains the same medication name and has a different meaning. Other processing is needed to handle negation, timing, relationships and uncertainty.
Entity linking is another related task. It connects a mention to a particular record or standard identifier—for example, determining which medication product a brand name refers to. Recognizing the words and matching them to a dependable database entry should be evaluated separately.
NER can be built with rules, specialized models or general language models. Evaluation usually asks how many marked items were correct and how many relevant items were missed. Precision describes the proportion of proposed matches that are correct; recall describes the proportion of relevant items found. A system may improve one while worsening the other.
In a referral workflow, NER could help locate references to investigations, clinicians and appointment dates. A coordinator may still need the surrounding sentence before acting. In privacy work, it can help identify information for redaction, but missing a single identifier can matter. An NER tool is not, by itself, proof that a document meets a legal de-identification standard. The complete process needs checks suited to what the information will be used for.
Sources: Hugging Face — Token Classification; HHS — Guidance Regarding Methods for De-identification of Protected Health Information
To learn more, take a look at the AI in Health Care Certificate of Specialization from the Advanced Learning Academy at Harvard T.H. Chan School of Public Health. You can take an individual course or work toward the full certificate.
AI is a fast-moving field. This explanation reflects our class discussions and related material at the time of writing. Terminology, capabilities and tools may change.
For suggested additions or corrections, please email me at tpanch@hsph.harvard.edu.
Dr. Trishan Panch
Program Director, AI in Health Care
Harvard T.H. Chan School of Public Health — Advanced Learning Academy
Lead with AI in Health Care
The AI Pragmatist is a monthly newsletter from ALA faculty, with new explainers & essays from the Advanced Learning Academy