label-studio icon indicating copy to clipboard operation
label-studio copied to clipboard

Text of a label mention does not match its (start, end) span when granularity=word

Open gcaillaut opened this issue 3 years ago • 0 comments

Describe the bug

When setting granularity to word, (start, end) of a Label does not match its text attribute.

To Reproduce

Set a Text tag to annotate with granularity set to "word". Then add a Labels tag, and define a set of labels. When annotating the text, highlight a subset of a word. For instance, if you want to annotate the word France as a GEOLOC entity, highlight a subset such as ran. Label-Studio will automatically expand the region to the whole word since the granularity is set to word. The start and end position of the span will be updated accordingly to the new span. HOWEVER, Label-Studio does not update the text attribute.

Expected behavior

The text attribute of the label annotation should be updated to "France".

Screenshots

The screenshot below illustrates the issue with the mention côte d’Azur. Il selected the subset "te d’Az", which have been properly expanded to the whole mention "côte d’Azur". However, the right pane shows the initial text selection "te d’Az"

issue-label-studio

Environment (please complete the following information):

  • Docker
  • Label Studio Version 1.4.1

Additional context

gcaillaut avatar Aug 29 '22 09:08 gcaillaut