How to convert JSONL annotation file to CONLL BIO tags?

I have dataset annotated with prodigy. I want to convert this JSONL file to CONLL BIO tagging as following

George B-PER
Washington I-PER
went O
to O
Washington B-LOC

Houseton I-PER
stayed O
home O

Is there straightforward way to do this?


Hi! The JSON data specifies the character offsets and tokens so it's mostly just a question of converting character offsets to token-based tags. spaCy has some handy utilities for this that can do it automatically for you. See here for a code example: