> For the complete documentation index, see [llms.txt](https://docs.universaldatatool.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.universaldatatool.com/building-and-labeling-datasets/named-entity-recognition.md).

# Named Entity Recognition

## Setup the Dataset

Navigate to [udt.dev](https://udt.dev) and click "New File"

![Click "New File" on udt.dev](/files/-MI11H2GNT530d7n2r1Q)

Then select the Named Entity Recognition button from the `Setup > Data Type` page.

![Select Named Entity Recognition when choosing an interface](/files/-MI5yZO_K24uUxEykcwf)

You can now configure the interface you'd like for you Named Entity Recognition dataset by adding any labels you'd like to display per sample.

![Named Entity Recognition Configuration](/files/-MIFVmniU3vVkbNe1m3I)

## Import Data

You can use any of the following methods to import text data.

* [Import Text Snippets](/importing-data/import-text-snippets.md)
* [Import from CSV or JSON](/importing-data/import-from-csv-or-json.md)

## Label your Data (with friends!)

Go to the `Label` tab to begin labeling data. See the [Collaborative Labeling Guide](/collaborative-labeling.md) to label with friends or a team of your labelers.

![Named Entity Recognition Example Interface](/files/-MIFWlymn4iqkDZ76fyI)

## Export and Use

The easiest way to use a Named Entity Recognition dataset is using the JSON format. Use the "Download JSON" button at the top when you're done labeling and check out the [Named Entity Recognition JSON Specification](https://github.com/UniversalDataTool/udt-format/blob/master/interfaces/text_entity_recognition.md).

Here's what a JSON sample looks like in the resultant dataset:

```javascript
{
  "document": "This strainer makes a great hat, I'll wear it while I serve spaghetti",
  "annotation": {
    "entities": [
      { text: "strainer", label: "hat", start: 5, end: 12 },
      { text: "spaghetti", label: "food", start: 60, end: 68 }
    ]
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.universaldatatool.com/building-and-labeling-datasets/named-entity-recognition.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
