All labels highlighted although only one label specified

Hi,
To speed up the annotation and training, I took my data (data.jsonl) and annotated it (with 8 labels) using llm and then used it to correct and verify the data. The approach I follow is to annotate / correct one label at a time.

  1. prodigy ner.llm.fetch spacy-llm-config.cfg data.jsonl data_annotated.jsonl
  2. prodigy ner.correct ner_person en_core_web_sm data_annotated.jsonl --label PERSON --unsegmented &

However, in this case, I get all the entited highted in the app. What I am looking for is only highlight the PERSON entity.

Is there a command line parameter, setting or something that I am missing ?

Hi @tushar,

If the input dataset contains labelled spans, Prodigy will render them and there is not really a setting to disable it as, in most cases, it is actually desirable. The --label argument determines which labels to use for annotation in the current session.

You could either add a simple postprocessing step that filters only PERSON spans and use that as the input to ner.correct or visually dim the other labels to make it visually clear that you're focusing on the PERSON entity.
I would actually recommend this second approach where you focus on the PERSON label but still have the other labels as a reference so that you don't accidentally produce overlapping spans in a given example.
You can set the colors of the labels via custom_theme setting in prodigy.json

{
  "custom_theme": {
    "labels": {
      "ORG": "#b5c6c9",
      "PERSON": "#ffd700",
      "LOC": "#b5c6c9"
    }
  }
}
1 Like

Hi @magdaaniol,
Thanks for your help. I'll try that.

Still, if possible, keep it as feedback to be released in later versions. The challenge is that, in most cases, I'll try and pre-fetch using llm and correct the labels, one by one only.

Thanks,

Thanks for explaining your label correction workflow. The pre-fetch approach with individual review makes sense, for sure. I'll make note of your feedback about this!