Skip to content

Commit 7f6345e

Browse files
Merge pull request #113 from CentreForDigitalHumanities/feature/conflict-label
Feature/conflict label
2 parents fe46e28 + b8120b1 commit 7f6345e

8 files changed

Lines changed: 63 additions & 2 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generated by Django 4.2.30 on 2026-06-08 09:32
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("annotation", "0003_labelannotation_and_more"),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name="problemannotation",
15+
name="entailment_label",
16+
field=models.CharField(
17+
choices=[
18+
("neutral", "Neutral"),
19+
("entailment", "Entailment"),
20+
("contradiction", "Contradiction"),
21+
("conflict", "Conflict"),
22+
("unknown", "Unknown"),
23+
],
24+
default="unknown",
25+
max_length=255,
26+
),
27+
),
28+
]

backend/problem/management/commands/import_fracas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Command(BaseCommand):
1414
ENTAILMENT_LABELS = {
1515
"yes": Problem.EntailmentLabel.ENTAILMENT,
1616
"no": Problem.EntailmentLabel.CONTRADICTION,
17-
"unknown": Problem.EntailmentLabel.NEUTRAL,
17+
"unknown": Problem.EntailmentLabel.CONFLICT,
1818
"undefined": Problem.EntailmentLabel.UNKNOWN,
1919
}
2020

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generated by Django 4.2.30 on 2026-06-08 09:32
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("problem", "0008_delete_knowledgebase"),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name="problem",
15+
name="entailment_label",
16+
field=models.CharField(
17+
choices=[
18+
("neutral", "Neutral"),
19+
("entailment", "Entailment"),
20+
("contradiction", "Contradiction"),
21+
("conflict", "Conflict"),
22+
("unknown", "Unknown"),
23+
],
24+
default="unknown",
25+
max_length=255,
26+
),
27+
),
28+
]

backend/problem/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class EntailmentLabel(models.TextChoices):
1919
NEUTRAL = "neutral", "Neutral"
2020
ENTAILMENT = "entailment", "Entailment"
2121
CONTRADICTION = "contradiction", "Contradiction"
22+
CONFLICT = "conflict", "Conflict"
2223
UNKNOWN = "unknown", "Unknown"
2324

2425
dataset = models.CharField(

frontend/src/app/annotate/annotation-input/problem-details/entailment-label-badge/entailment-label-badge.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export class EntailmentLabelBadgeComponent {
2828
return "badge text-bg-secondary";
2929
case EntailmentLabel.UNKNOWN:
3030
return "badge text-bg-warning";
31+
case EntailmentLabel.CONFLICT:
32+
return "badge text-bg-dark";
3133
}
3234
});
3335
}

frontend/src/app/shared/displayTextMappings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export const entailmentLabels: Record<EntailmentLabel, string> = {
55
[EntailmentLabel.CONTRADICTION]: $localize`Contradiction`,
66
[EntailmentLabel.NEUTRAL]: $localize`Neutral`,
77
[EntailmentLabel.UNKNOWN]: $localize`Unknown`,
8+
[EntailmentLabel.CONFLICT]: $localize`Conflict`,
89
};
910

1011
export const datasetLabels: Record<Dataset, string> = {

frontend/src/app/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export enum EntailmentLabel {
123123
ENTAILMENT = "entailment",
124124
CONTRADICTION = "contradiction",
125125
NEUTRAL = "neutral",
126+
CONFLICT = "conflict",
126127
UNKNOWN = "unknown",
127128
}
128129

langpro-container

0 commit comments

Comments
 (0)