Highlighting text in the relations annotation interface

Is there a way to highlight text in the relations annotation interface? The example linked here shows a spans attribute that labels the text. However, it seems like the label must be defined as a span-label, otherwise, it won't show up.

The use case for highlighting text is that the highlighted text serves as a way to easily identify some relations in the text. They act as cue words to signal that there may be a relation in the text. Therefore, I don't want to define them as a span-label, rather just be highlighted to the annotator.

Thank you for your help!

Hi Ishaan!

I'm curious to understand a bit better why you can't use the spans key in the .json to help guide your labelling. The spans technically change the UI to make it more clear that there's something of interest, and the spans can be ignored by a spaCy model later in the pipeline. Is it the issue that you're also trying to train spans later?

It seems like in the rel.manual recipe, the highlighted spans do not show up if the label for the span isn't defined using the span-label attribute.

An example of this would be defining a span like:

"spans": {{"start": 98, "end": 103, "label": "temporal connective"}}

and then starting the recipe like this:

prodigy rel.manual sample_rel en_core_web_sm data.jsonl --label CAUSE --span-label EVENT

Ah yes, this is true. You must pass the --span-label along at the moment.