HumanSignal / HumanSignal/label-studio

ParagraphLabels are not displayed correctly in predictions

Open
#6,122 1 comment 1 reaction 0 assignees View on GitHub
community:bug community:reviewed
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

**Describe the bug**
When I import pre-annotated prediction data with the ParagraphLabels, the region is emphasized but not with the correct label. Changing ParagraphLabels to Labels tag solves this but then is not possible to annotate data.

**To Reproduce**
Labelling interface:
`






`

Data:
`
[
{
"annotations":[],
"drafts": [],
"predictions": [
{
"model_version": "Emotion:1",
"result": [
{
"type": "paragraphlabels",
"value": {
"end": "1",
"start": "1",
"labels": [
"EMOTION"
],
"endOffset": 8,
"startOffset": 5
},
"to_name": "dialogue",
"from_name": "emotion"
}
]
}
],
"data": {
"dialogue": [
{
"text": "Hello",
"author": "System Context"
},
{
"text": "I am sad.",
"author": "User Input"
}
]
}
}
]
`

**Expected behavior**
Pre-annotated ParagraphLabels are emphasized with the correct label.

**Screenshots**
![Screenshot from 2024-07-23 09-55-13](https://github.com/user-attachments/assets/c72d47bf-76c2-41a3-baaf-e0665661e418)

**Environment (please complete the following information):**
- OS: Debian
- Label Studio Version 1.12.1

**Additional context**
It has worked in version 1.8.0, the following screenshot shows the same setting.
![Screenshot from 2024-07-23 11-26-43](https://github.com/user-attachments/assets/9f687876-1bb9-424f-9d2d-29e6b951be48)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.