Renaming labels in NER

Hi,

I annotated a large amount of documents with very granular labels. Now, I want to merge some very granular labels in its "parent" label. Is there a way to edit label names in prodigy? I thought of a way to do this (stated below), but wanted to know if it can be done in Prodigy.

Method (prodigy->python->prodigy): Get the output of the database, edit "spans" in the output jsonl file via python. Read the jsonl as a new database into Prodigy.

Any help or recommendation is welcomed! Thanks!

Hi! That sounds like a reasonable approach to me :slightly_smiling_face: Datasets in Prodigy are append-only by design, so you'd probably want to create a new dataset for your edited annotations. And if it turns out you want to go back to the previous state, you still have the old dataset available.

(If you're a jq wizard, you could probably write a command-line one-liner to do the data transformation and then pipe the result forward to a new dataset, all in one step. But I couldn't tell you how :sweat_smile:)

1 Like