From a1116e4333f398d5dd68e80d2dcc0f17a96173ab Mon Sep 17 00:00:00 2001 From: averel10 Date: Fri, 17 Apr 2026 13:24:21 +0200 Subject: [PATCH] feat: added confidence data export and visualization --- src/app/actions/participants.ts | 4 ++++ src/components/ParticipantDetailView.tsx | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/app/actions/participants.ts b/src/app/actions/participants.ts index a94dae5..36880f1 100644 --- a/src/app/actions/participants.ts +++ b/src/app/actions/participants.ts @@ -36,6 +36,7 @@ export interface ParticipantDetail extends ParticipantListItem { rating: number; dialectLabel: string; createdAt: Date; + confidence: number; }>; } @@ -172,6 +173,7 @@ export async function getParticipantDetail( rating: annotation.rating, dialectLabel: annotation.dialectLabel, createdAt: annotation.createdAt, + confidence: annotation.confidence, }) .from(annotation) .leftJoin(dataset_entry, eq(annotation.datasetEntryId, dataset_entry.id)) @@ -201,6 +203,7 @@ export async function getParticipantDetail( externalId: a.externalId || 'Unknown', fileName: a.fileName || 'Unknown', datasetId: a.datasetId || 0, rating: a.rating, dialectLabel: a.dialectLabel, + confidence: a.confidence, createdAt: a.createdAt, })), createdAt: p.createdAt, @@ -316,6 +319,7 @@ export async function exportParticipantDataAsJson( fileName: ann.fileName, datasetId: ann.datasetId, rating: ann.rating, + confidence: ann.confidence, dialectLabel: ann.dialectLabel, createdAt: ann.createdAt, })), diff --git a/src/components/ParticipantDetailView.tsx b/src/components/ParticipantDetailView.tsx index dd7d88a..597d6e9 100644 --- a/src/components/ParticipantDetailView.tsx +++ b/src/components/ParticipantDetailView.tsx @@ -153,6 +153,10 @@ export default function ParticipantDetailView({ participant, experimentId }: Par
Rating
{selectedAnnotation.rating}
+
+
Confidence
+
{selectedAnnotation.confidence}
+
Dialect