Skip to content

Commit ecb3bd3

Browse files
committed
#2191 - Agreement does not take tagset into account
- Adjust based on discussion at dkpro/dkpro-statistics#35
1 parent 8086a16 commit ecb3bd3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

inception/inception-agreement/src/main/java/de/tudarmstadt/ukp/clarin/webanno/agreement/measures/krippendorffalpha/KrippendorffAlphaAgreementMeasure.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ public double calculateAgreement()
8181
double D_O = calculateObservedDisagreement();
8282
double D_E = calculateExpectedDisagreement();
8383
if (D_O == 0.0 && D_E == 0.0) {
84-
return 1.0;
84+
if (study.getItemCount() == 0) {
85+
return Double.NaN;
86+
}
87+
else {
88+
return 1.0;
89+
}
8590
}
8691
return 1.0 - (D_O / D_E);
8792
}

0 commit comments

Comments
 (0)