This repository was archived by the owner on Jan 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
api-editor/gui/src/features/statistics Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,10 @@ const QualityPieChart: React.FC<QualityPieChartProps> = function ({ annotationTy
55
55
56
56
const autogeneratedAnnotations = annotations . filter ( ( it ) => ( it . authors ?? [ ] ) . includes ( '$autogen$' ) ) ;
57
57
const numberOfCorrectAnnotations = autogeneratedAnnotations . filter (
58
- ( it ) => ! it . isRemoved && it . reviewResult === ReviewResult . Correct && ( it . authors ?? [ ] ) . length <= 1 ,
58
+ ( it ) => ! it . isRemoved && isCorrect ( it ) && ( it . authors ?? [ ] ) . length <= 1 ,
59
59
) . length ;
60
60
const numberOfChangedAnnotations = autogeneratedAnnotations . filter (
61
- ( it ) => ! it . isRemoved && it . reviewResult === ReviewResult . Correct && ( it . authors ?? [ ] ) . length > 1 ,
61
+ ( it ) => ! it . isRemoved && isCorrect ( it ) && ( it . authors ?? [ ] ) . length > 1 ,
62
62
) . length ;
63
63
const numberOfWrongOrRemovedAnnotations = autogeneratedAnnotations . filter (
64
64
( it ) => it . isRemoved || it . reviewResult === ReviewResult . Wrong ,
@@ -104,3 +104,10 @@ const QualityPieChart: React.FC<QualityPieChartProps> = function ({ annotationTy
104
104
</ Box >
105
105
) ;
106
106
} ;
107
+
108
+ const isCorrect = function ( annotation : Annotation ) : boolean {
109
+ return (
110
+ annotation . reviewResult === ReviewResult . Correct ||
111
+ ( ( annotation . reviewers ?. length ?? 0 ) > 0 && ! annotation . reviewResult )
112
+ ) ;
113
+ } ;
You can’t perform that action at this time.
0 commit comments