# textcat-multilabel annotations format

**URL:** <https://support.prodi.gy/t/textcat-multilabel-annotations-format/7037>\
**Category:** Uncategorized\
**Tags:** textcat\
**Created:** [January 17, 2024, 7:41pm UTC](https://support.prodi.gy/t/textcat-multilabel-annotations-format/7037 "2024-01-17T19:41:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gio](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/gio/32/4295_2.png) [@Gio](https://support.prodi.gy/u/Gio)\
**Post date:** [January 17, 2024, 7:41pm UTC](https://support.prodi.gy/t/textcat-multilabel-annotations-format/7037/1 "2024-01-17T19:41:02Z")

</div>

Hi there, new to Prodigy but very excited to get training models to see how predictive my current labels are and try some active learning from there!

Could anyone help me with the correct format of the annotations needed for textcat-multilabel?  
I have several labels, of which multiple could be assigned to a text at once.  
I am currently trying to read in the JSONL which contains my existing annotations (not made in Prodigy), where each dict has the following format:  
`{"text": " I can't complain, you've got to take the rough with the smooth.", "cats": {"30": false, "12": false, "24": false, "19": true, "25": false, "23": false, "11": false, "32": false, "36": false, "13": false, "33": false, "15": false, "28": false, "14": false, "20": false, "17": false, "16": false, "27": false, "37": true, "38": false, "21": false, "10": false, "31": false, "29": false, "22": false}}`

`prodigy db-in` reads these into my database but says :

```python
✔ Created unstructured dataset 'verbal' in database SQLite
✔ Imported 984 annotated examples and saved them to 'verbal' (session
2024-01-17_20-32-34) in database SQLite
Found and keeping existing "answer" in 0 examples

```

Then, indeed, when I try to train I get an error:  
`TypeError: [E930] Received invalid get_examples callback in `MultiLabel\_TextCategorizer.initialize`. Expected function that returns an iterable of Example objects but got: []`  
Any help on how to adjust my JSONL to the correct format would be greatly appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![ryanwesslen](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ryanwesslen/32/2969_2.png) [@ryanwesslen](https://support.prodi.gy/u/ryanwesslen)\
**Post date:** [January 19, 2024, 1:50pm UTC](https://support.prodi.gy/t/textcat-multilabel-annotations-format/7037/2 "2024-01-19T13:50:01Z")

</div>

hi @Gio,

Thanks for your question and welcome to the Prodigy community 👋

> [@Gio](#):
>
> Could anyone help me with the correct format of the annotations needed for textcat-multilabel?

Check out [this thread](https://support.prodi.gy/t/multilabel-jsonl-format-active-learning/5843) or [this thread](https://support.prodi.gy/t/training-data-format-for-multiclass-textcat/5882/2).

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Gio](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/gio/32/4295_2.png) [@Gio](https://support.prodi.gy/u/Gio)\
**Post date:** [January 26, 2024, 2:15pm UTC](https://support.prodi.gy/t/textcat-multilabel-annotations-format/7037/3 "2024-01-26T14:15:43Z")

</div>

Very helpful, thank you very much!

The following format worked a charm:  
`{"options": [{"id": "OTHER"}, {"id": "baking"}, {"id":"bread"}, {"id":"chicken"}, {"id":"eggs"}, {"id":"equipment"}, {"id": "food-safety"},{"id":"meat"}, {"id":"sauce"}, {"id":"storage-method"}, {"id":"substitutions"}], "accept":["OTHER","baking"], "text": "How can I get chewy chocolate chip cookies?\n<p>My chocolate chips cookies are always too crisp. How can I get chewy cookies, like those of Starbucks?</p>\n<hr/>\n<p>Thank you to everyone who has answered. So far the tip that had the biggest impact was to chill and rest the dough, however I also increased the brown sugar ratio and increased a bit the butter. Also adding maple syrup helped. </p>\n"}`
