# Text Classification

## Setup the Dataset

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

![Click "New File" on udt.dev](https://708390366-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFuZsfsLW71orr4EXRY%2F-MI1-I35x0iE2R-GuGoG%2F-MI11H2GNT530d7n2r1Q%2Fimage.png?alt=media\&token=8438ff28-e06e-4025-86ab-0be4818a2730)

Then select the Text Classification button from the `Setup > Data Type` page.

![](https://708390366-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFuZsfsLW71orr4EXRY%2F-MI5xmI5P1vIVEHqJPCX%2F-MI5yZO_K24uUxEykcwf%2Fimage.png?alt=media\&token=bc028732-3396-4c41-abdd-e04362301516)

You can now configure the interface you'd like for you Text Classification dataset by adding any classifications you'd like to display per sample, as well as configure if multiple classifications are allowed to be selected.

![Text Classification Configuration](https://708390366-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFuZsfsLW71orr4EXRY%2F-MIFOHQ9SvdGs7j-Qecs%2F-MIFU5MD1KVnohP5VBoN%2Fimage.png?alt=media\&token=af0f04fc-ba98-4b33-8e94-3f6578bf9832)

## Import Data

You can use any of the following methods to import text data. If you're just getting started, you can quickly create a dataset using the COCO Images method!

* [Import Text Snippets](https://docs.universaldatatool.com/importing-data/import-text-snippets)
* [Import from CSV or JSON](https://docs.universaldatatool.com/importing-data/import-from-csv-or-json)

## Label your Data (with friends!)

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

![An example Text Classification interface](https://708390366-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFuZsfsLW71orr4EXRY%2F-MIFOHQ9SvdGs7j-Qecs%2F-MIFV5dbhH1wW0OYFTDt%2Fimage.png?alt=media\&token=10bd4878-8e76-44d8-82d2-9a316b59a3e4)

## Export and Use

Text Classification can easily be exported and read as a CSV or JSON file.

For example, if you export as a CSV you'll get a table that looks like the following:

| path      | document                              | annotation          |
| --------- | ------------------------------------- | ------------------- |
| samples.0 | This has made me so happy. I love it. | positive\_sentiment |
| samples.1 | I hate this thing. It's so bad.       | negative\_sentiment |


---

# Agent Instructions: 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:

```
GET https://docs.universaldatatool.com/building-and-labeling-datasets/text-classification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
