# Exporting NER annotations for HF datasets

**URL:** <https://support.prodi.gy/t/exporting-ner-annotations-for-hf-datasets/4726>\
**Category:** Uncategorized\
**Tags:** enhancement, third-party, transformers\
**Created:** [September 27, 2021, 9:07am UTC](https://support.prodi.gy/t/exporting-ner-annotations-for-hf-datasets/4726 "2021-09-27T09:07:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisM](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@ChrisM](https://support.prodi.gy/u/ChrisM)\
**Post date:** [September 27, 2021, 9:07am UTC](https://support.prodi.gy/t/exporting-ner-annotations-for-hf-datasets/4726/1 "2021-09-27T09:07:36Z")

</div>

Just a quick question in case someone has already done this: I have exported my annotations to JSONL for NER with the transformers library. I'm going to use the HF datasets package. Has anybody converted the prodigy span format to something suitable for loading seamlessly into a dataset and then into a transformers NER model?

---

<div class="post-metadata">

**Author:** ![ChrisM](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@ChrisM](https://support.prodi.gy/u/ChrisM)\
**Post date:** [September 30, 2021, 3:17am UTC](https://support.prodi.gy/t/exporting-ner-annotations-for-hf-datasets/4726/2 "2021-09-30T03:17:20Z")

</div>

I've done it! With some very slow pandas along the way, unfortunately. I'll try to optimise and then share at some point.

---

<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:** [October 1, 2021, 8:57am UTC](https://support.prodi.gy/t/exporting-ner-annotations-for-hf-datasets/4726/3 "2021-10-01T08:57:08Z")

</div>

Awesome! If there's something you want to share, that'd be great, and we'd be happy to help you tidy it up so we can maybe make it a proper integration. Because that'd definitely be super cool to have 🙌

---

<div class="post-metadata">

**Author:** ![ChrisM](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@ChrisM](https://support.prodi.gy/u/ChrisM)\
**Post date:** [December 9, 2021, 6:19am UTC](https://support.prodi.gy/t/exporting-ner-annotations-for-hf-datasets/4726/4 "2021-12-09T06:19:49Z")

</div>

If anyone is interested, this is part of an upcoming paper using transformers for adverse drug reaction detection. We're using Prodigy for all our annotation. Here is the repo ([GitHub - AustinMOS/adr-nlp](https://github.com/AustinMOS/adr-nlp)) for training a NER model using a JSONL file of annotations exported from Prodigy.
