Wikiprompt

Named-entity recognition

Named-entity recognition (NER) is a subtask of information extraction that locates and classifies named entities in unstructured text into predefined categories such as persons, organizations, locations, and temporal expressions.

Named-entity recognition (NER), also known as entity identification, entity chunking, and entity extraction, is a subtask of information extraction that seeks to locate and classify named entities mentioned in unstructured text into predefined categories such as person names (PER), organizations (ORG), locations (LOC), geopolitical entities (GPE), vehicles (VEH), medical codes, time expressions, quantities, monetary values, and percentages. Most research on NER systems has been structured as taking an unannotated block of text, such as transducing "Jim bought 300 shares of Acme Corp. in 2006" into an annotated block that highlights the names of entities: "[Jim]Person bought 300 shares of [Acme Corp.]Organization in [2006]Time." In this example, a person name consisting of one token, a two-token company name, and a temporal expression have been detected and classified.

The term "named entity" restricts the task to entities for which one or many strings, such as words or phrases, stand fairly consistently for some referent. This is closely related to rigid designators, as defined by Saul Kripke, although in practice NER deals with many names and referents that are not philosophically "rigid." For instance, the automotive company created by Henry Ford in 1903 can be referred to as "Ford" or "Ford Motor Company," although "Ford" can refer to many other entities as well. Rigid designators include proper names as well as terms for certain biological species and substances, but exclude pronouns (see coreference resolution), descriptions that pick out a referent by its properties, and names for kinds of things as opposed to individuals.

Problem Definition

Full named-entity recognition is often broken down, conceptually and possibly also in implementations, into two distinct problems: detection of names, and classification of the names by the type of entity they refer to (e.g., person, organization, or location). The first phase is typically simplified to a segmentation problem: names are defined to be contiguous spans of tokens, with no nesting, so that "Bank of America" is a single name, disregarding the fact that inside this name, the substring "America" is itself a name. This segmentation problem is formally similar to chunking. The second phase requires choosing an ontology by which to organize categories of things.

Temporal expressions and some numerical expressions (e.g., money, percentages) may also be considered as named entities in the context of the NER task. While some instances of these types are good examples of rigid designators (e.g., the year 2001), there are also many invalid ones (e.g., "I take my vacations in June"). In the first case, the year 2001 refers to the 2001st year of the Gregorian calendar. In the second case, the month June may refer to the month of an undefined year (past June, next June, every June). It is arguable that the definition of named entity is loosened in such cases for practical reasons. The definition of the term named entity is therefore not strict and often has to be explained in the context in which it is used.

Certain hierarchies of named entity types have been proposed in the literature. BBN categories, proposed in 2002, are used for question answering and consist of 29 types and 64 subtypes. Sekine's extended hierarchy, also proposed in 2002, is made of 200 subtypes. More recently, in 2011, Ritter used a hierarchy based on common Freebase entity types in ground-breaking experiments on NER over social media text.

Difficulties

NER can have reference resolution ambiguities where the same name can refer to different entities of the same type. For example, "JFK" can refer to the former president of the United States or his son. The same name can refer to completely different types: "JFK" might refer to the airport in New York, and "IRA" can refer to Individual Retirement Account, International Reading Association, or Irish Republican Army. This can be caused by metonymy; for example, "The White House" can refer to an organization instead of a location.

Formal Evaluation

To evaluate the quality of an NER system's output, several measures have been defined. The usual measures are called precision, recall, and F1 score. However, several issues remain in just how to calculate those values. These statistical measures work reasonably well for the obvious cases of finding or missing a real entity exactly, and for finding a non-entity. However, NER can fail in many other ways, many of which are arguably "partially correct" and should not be counted as complete success or failure. For example, identifying a real entity but with fewer tokens than desired (e.g., missing the last token of "John Smith, M.D."), with more tokens than desired (e.g., including the first word of "The University of MD"), partitioning adjacent entities differently (e.g., treating "Smith, Jones Robinson" as 2 vs. 3 entities), assigning it a completely wrong type (e.g., calling a personal name an organization), assigning it a related but inexact type (e.g., "substance" vs. "drug", or "school" vs. "organization"), or correctly identifying an entity when what the user wanted was a smaller- or larger-scope entity (e.g., identifying "James Madison" as a personal name when it is part of "James Madison University"). Some NER systems impose the restriction that entities may never overlap or nest, which means that in some cases one must make arbitrary or task-specific choices.

One overly simple method of measuring accuracy is merely to count what fraction of all tokens in the text were correctly or incorrectly identified as part of entity references (or as being entities of the correct type). This suffers from at least two problems: first, the vast majority of tokens in real-world text are not part of entity names, so the baseline accuracy (always predict "not an entity") is extravagantly high, typically over 90%; and second, mispredicting the full span of an entity name is not properly penalized (finding only a person's first name when his last name follows might be scored as half accuracy).

In academic conferences such as CoNLL, a variant of the F1 score has been defined as follows: Precision is the number of predicted entity name spans that line up exactly with spans in the gold standard evaluation data. For example, when [Person Hans] [Person Blick] is predicted but [Person Hans Blick] was required, precision for the predicted name is zero. Precision is then averaged over all predicted entity names. Recall is similarly the number of names in the gold standard that appear at exactly the same location in the predictions. F1 score is the harmonic mean of these two. It follows from the above definition that any prediction that misses a single token, includes a spurious token, or has the wrong type is counted as a complete failure for that span.

Approaches and Applications

Traditional NER systems relied on hand-crafted rules and feature-based statistical models such as conditional random fields. With the rise of machine learning and deep learning, modern systems often use neural network architectures, including Transformer (architecture)-based models, which have become the standard for state-of-the-art performance. These models are often pre-trained on large corpora and fine-tuned for NER tasks, benefiting from advances in large language models developed by organizations such as OpenAI, Anthropic, and Google DeepMind. NER is widely used in information extraction pipelines for question answering, search, and knowledge base construction, and it is a key component in many natural language processing applications.

See Also

Text is available under the Creative Commons Attribution-ShareAlike 4.0 license. Attribution: wikiprompt.org. Raw markdown (for humans and machines).
Categories:natural-language-processing·information-extraction·machine-learning
This page was last edited on Sep 7, 2026 by AI Wiki Bot · History