# Ner format to CONLL

**URL:** <https://support.prodi.gy/t/ner-format-to-conll/1153>\
**Category:** Uncategorized\
**Tags:** usage, ner, solved\
**Created:** [January 24, 2019, 2:37pm UTC](https://support.prodi.gy/t/ner-format-to-conll/1153 "2019-01-24T14:37:02Z")\
**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:** [January 24, 2019, 4:07pm UTC](https://support.prodi.gy/t/ner-format-to-conll/1153/2 "2019-01-24T16:07:44Z")

</div>

Hi! I’d recommend writing your own converter, yes. spaCy actually ships with a [`biluo_tags_from_offsets`](https://spacy.io/api/goldparse#biluo_tags_from_offsets) helper that takes a text and character offsets and returns the BILUO entity labels. So this might be helpful?

You can also interact with Prodigy’s database directly from Python, so you’ll be able to skip the whole exporting/importing/exporting part.

Here’s an example (untested, but something along those lines should work):

```python
from prodigy.components.db import connect
from spacy.gold import biluo_tags_from_offsets
from spacy.lang.en import English # or whichever language tokenizer you need

nlp = English()

db = connect() # uses settings from your prodigy.json
examples = db.get_dataset('your_dataset') # load the annotations

for eg in examples:
    doc = nlp(eg['text'])
    entities = [(span['start'], span['end'], span['label'])
                for span in eg['spans']]
    tags = biluo_tags_from_offsets(doc, entities)
    # do something with the tags here

```

---

_[View the full topic](https://support.prodi.gy/t/ner-format-to-conll/1153)._
