Change label name on annotated data

In the course of adapting my strategy, I would like to change the name of a label (I have decided to combine 2 labels then run a separate model to separate them).

I know I could import the dataset, and do ner.correct, but it is non ideal, as I would have to recheck through all the other labels just in case the model didn’t quite get it, and in fact there are quite a lot of labels to change.

I know I could just live with the wrong label, but again, its not ideal and may lead to confusion later.

Can you suggest any ways to readin the dataset, and rename LABEL-X to LABEL-Y

Or any other approaches? I'm guessing I could read in the json and change the label, but I am struggling to work out how nested the label field is and I just thought I would see if a simple approach was available.

Thank you as ever for your very helpful and informative forum.

Hi @alphie,

I understand it's just a question of changing a label name on the annotated dataset and model has not been trained yet?
If that's the case, then yes, it should be as easy as reading the jsonl file and replacing the name. Maybe you can share the structure of one of the examples in this dataset to make sure we don't miss anything?

Thanks!

Thank you.

Yes, it's just a question of changing a label name in the annotated dataset. I will be retraining the model anyway.

Working out the jsonl structure was tricky with 1000s of lines, so now I am thinking of doing a good old find and replace in VScode, and then reimport the dataset!

Any reason why not? (I only have a few datasets)

Hi @alphie,

Find and replace will work as well in this case.