# Highlighting text in the relations annotation interface

**URL:** <https://support.prodi.gy/t/highlighting-text-in-the-relations-annotation-interface/5580>\
**Category:** Uncategorized\
**Created:** [April 28, 2022, 12:42am UTC](https://support.prodi.gy/t/highlighting-text-in-the-relations-annotation-interface/5580 "2022-04-28T00:42:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishaan](https://avatars.discourse-cdn.com/v4/letter/i/f9ae1b/32.png) [@ishaan](https://support.prodi.gy/u/ishaan)\
**Post date:** [April 28, 2022, 12:42am UTC](https://support.prodi.gy/t/highlighting-text-in-the-relations-annotation-interface/5580/1 "2022-04-28T00:42:47Z")

</div>

Is there a way to highlight text in the relations annotation interface? The example linked [here](https://prodi.gy/docs/api-interfaces#relations) 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!

---

<div class="post-metadata">

**Author:** ![koaning](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/koaning/32/230_2.png) [@koaning](https://support.prodi.gy/u/koaning)\
**Post date:** [April 28, 2022, 7:43am UTC](https://support.prodi.gy/t/highlighting-text-in-the-relations-annotation-interface/5580/2 "2022-04-28T07:43:57Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ishaan](https://avatars.discourse-cdn.com/v4/letter/i/f9ae1b/32.png) [@ishaan](https://support.prodi.gy/u/ishaan)\
**Post date:** [April 29, 2022, 7:14am UTC](https://support.prodi.gy/t/highlighting-text-in-the-relations-annotation-interface/5580/3 "2022-04-29T07:14:13Z")

</div>

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:

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

```

and then starting the recipe like this:

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

```

---

<div class="post-metadata">

**Author:** ![koaning](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/koaning/32/230_2.png) [@koaning](https://support.prodi.gy/u/koaning)\
**Post date:** [May 2, 2022, 8:53am UTC](https://support.prodi.gy/t/highlighting-text-in-the-relations-annotation-interface/5580/4 "2022-05-02T08:53:26Z")

</div>

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