convert .tsv format to prodigy jsonl

I have a .tsv file with token-per-line NER format & have converted it to JSON format using the CLI convert command: python -m spacy convert input.tsv output_dir -t json -c ner

This results in the following format:

[
  {
    "id":0,
    "paragraphs":[
      {
        "sentences":[
          {
            "tokens":[
              {
                "orth":"",
                "tag":"",
                "ner":""
              }
            ]
          }
        ]
      }
    ]
  }
]

Is there an option to convert the resultant .json into prodigy compatible .jsonl?

Thanks!

Hi! If you just need to convert your BILUO tags to character offsets (e.g. start, end and label, as it's also used in Prodigy's JSON format), you probably don't even need the roundtrip via spacy convert. spaCy has a simple utility that lets you convert BILUO tags to character offsets: https://prodi.gy/docs/named-entity-recognition#tip-biluo-offsets

Based on that, you can then set up the list of "spans": https://prodi.gy/docs/api-interfaces#ner