# Multi label tagging

**URL:** <https://support.prodi.gy/t/multi-label-tagging/806>\
**Category:** Uncategorized\
**Tags:** usage, textcat\
**Created:** [September 9, 2018, 8:27am UTC](https://support.prodi.gy/t/multi-label-tagging/806 "2018-09-09T08:27:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [September 10, 2018, 10:02am UTC](https://support.prodi.gy/t/multi-label-tagging/806/2 "2018-09-10T10:02:21Z")

</div>

Prodigy's `textcat.batch-train` recipe is optimised to train from binary annotations, so if you have data in this format, you can train your model using the built-in workflow.

If you want to convert data collected with the `choice` interface to the binary accept/reject format, you might also find this thread relevant:

> [@Converting choice annotations to textcat annotations](https://support.prodi.gy/t/converting-choice-annotations-to-textcat-annotations/777):
>
> Thank you for all your help up to date. I came across another problem that I’m not sure how to resolve. I’m using match recipe with choice view\_id to classify paragraphs. I would like to use the dataset obtain in this way in textcat.batch-train recipe, so I can train the model to recognize class of the paragraph. I know that the dataset that I currently have is not in the right format to use in the textcat.batch-train. I was trying to customize the recipe but I could not make it work. Could y…

> [@Raphael](#):
>
> do I need to pull it out then use spacy the good old way?

This is also an option. If you've collected data using the `choice` interface, you could then do something like this:

```python
options = ['LABEL_A', 'LABEL_B', 'LABEL_C']
data = [] # use this for training later
for eg in examples:
    accepted = eg.get('accept', [])
    cats = {label: label in accepted for label in options}
    data.append(eg['text'], cats)

```

Basically, you just need to check whether the `"accepted"` list of your annotated data includes the label (label was seleted by the user and should apply) or whether it doesn't. The above code will produce data in the following format, which you can use to train your model in spaCy:

```python
data = [
    ('Hello world', {'LABEL_A': True, 'LABEL_B': False, 'LABEL_C': True})
]

```

---

_[View the full topic](https://support.prodi.gy/t/multi-label-tagging/806)._
