Named Entity Recognition (NER) API, With Generative AI

What is NER?

NER stands for Named Entity Recognition. It is a subtask that involves identifying and classifying named entities in text into predefined categories such as the names of persons, organizations, locations, expressions of times, quantities, monetary values, percentages, etc.

Generative models like ChatGPT, GPT-3.5, GPT-4, LLaMA 2, Yi 34B, or Mixtral 8x7B, are very good at performing entity extraction.

NER is crucial for many NLP applications like question answering, text summarization, and machine translation, as it provides detailed information about the key elements of a text, enabling deeper understanding and processing. For instance, knowing that "Paris" refers to a location in a given text can significantly influence the interpretation of that text and the response generated by an NLP system.

Let's say you have the following sentence:

John Doe is a web developer at Google.

You would like to automatically detect that "John Doe" is a name, "web developer" is a job title, and "Google" is a company. And this is exactly what NER is going to do.

NER Annotation

Some Entity Extraction Use Cases

The world is full of unstructured data, especially the web. Being able to extract structured information from it can give access to a lot of valuable information. Here are a couple of examples.

Sort Customer Requests

When dealing with lots of customer requests (support, sales, ...) it definitely helps to apply NER in order to automatically sort these incoming requests. For example you could automatically extract the type of product mentioned in the request and route this to the right service accordingly.

Extract Financial Data

Extracting and consolidating financial data can be long and tedious. NER can definitely boost your productivity here by helping you extract the right data in a second.



Pre-process Resumes/Applications

HR services are sometimes having a hard time reading all these applications. It can be interesting for them to automatically highlight interesting entities like company names, skills,... in order to save time.

Extract Leads

Many B2B leads can be found on public websites or company brochures, but extracting them manually can sometimes be a pain. Thanks to NER you can automatically extract a person, with her jobtitle, and company, if they exist.

NLP Cloud's NER API

NLP Cloud proposes an entity extraction API that allows to perform Named Entity Recognition out of the box, based on spaCy, Ginza, or more advanced generative AI models equivalent to GPT-4, GPT-3.5, or ChatGPT, like LLaMA 2, Dolphin, Yi 34B, Mixtral 8x7B, and more. For advanced entity extraction on specific documents we recommend that fine-tune your own generative models for NER on NLP Cloud.

For more details, see our documentation about entity extraction here. For advanced usage, see the text generation API endpoint here. And easily test entity extraction on our playground.

Testing NER locally is one thing, but using it reliably in production is another thing. With NLP Cloud you can just do both!

Frequently Asked Questions

What is Named Entity Recognition (NER)?

Named Entity Recognition (NER) is a subtask of information extraction that identifies and classifies named entities in text into predefined categories such as the names of persons, organizations, locations, expressions of times, quantities, monetary values, percentages, etc. It is a fundamental Natural Language Processing (NLP) technique used for information retrieval, question answering systems, and knowledge extraction.

What are the common categories used in NER?

Common categories used in Named Entity Recognition (NER) include person names, organizations, locations, dates, times, monetary values, percentages, and quantities. These categories help in identifying and classifying key elements in text for information extraction and analysis.

How do modern NER systems handle language ambiguities and complex structures?

Modern Named Entity Recognition (NER) systems leverage advanced machine learning algorithms, notably deep learning architectures such as recurrent neural networks (RNN) and transformers, to analyze context and semantic relationships within text, enabling them to manage ambiguities and complex linguistic structures. They utilize vast amounts of annotated training data and pre-trained language models to accurately predict entities even in the presence of ambiguous or intricate constructions.

Can NER systems recognize new or unknown entities?

NER (Named Entity Recognition) systems primarily recognize entities they have been trained on, but their ability to recognize new or unknown entities depends on the generality of their training data and the adaptiveness of their algorithms. Some advanced systems, especially those employing deep learning and contextual understanding, can infer or generalize to identify previously unseen entities by learning from the context in which they appear. On NLP Cloud you can perfectly recognize new or unknown entities!

What languages does your AI API support for entity extraction?

We support entity extraction in 100 languages

How fast does the AI API return entities?

It depends on the size of your text and the AI model you are using. In general the response time is around a couple of seconds.

How to evaluate the accuracy of NER?

To evaluate the accuracy of a Named Entity Recognition (NER) system, one typically uses precision, recall, and the F1 score based on true positives, false positives, and false negatives. These metrics compare the system's output against a manually annotated gold standard or ground truth to determine how well the system identifies and classifies named entities.

Can I try your NER API for free?

Yes, like all the models on NLP Cloud, the NER API endpoint can be tested for free

How does your AI API handle data privacy and security during the entity extraction process?

NLP Cloud is focused on data privacy by design: we do not log or store the content of the requests you make on our API. NLP Cloud is both HIPAA and GDPR compliant.