Class PercentageAgreement
java.lang.Object
org.dkpro.statistics.agreement.AgreementMeasure
org.dkpro.statistics.agreement.coding.CodingAgreementMeasure
org.dkpro.statistics.agreement.coding.PercentageAgreement
- All Implemented Interfaces:
ICodingAgreementMeasure,ICodingItemSpecificAgreement,IAgreementMeasure,ICategorySpecificAgreement,IItemSpecificAgreement<ICodingAnnotationItem>
public class PercentageAgreement extends CodingAgreementMeasure implements ICodingItemSpecificAgreement, ICategorySpecificAgreement
Implementation of a simple percentage of agreement measure for calculating the inter-rater
agreement for two or more raters. The measure is neither chance-corrected nor weighted.
References:
References:
- Artstein, R. & Poesio, M.: Inter-Coder Agreement for Computational Linguistics. Computational Linguistics 34(4):555-596, 2008.
- Author:
- Christian M. Meyer
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PercentageAgreement(ICodingAnnotationStudy study)Initializes the instance for the given annotation study. -
Method Summary
Modifier and Type Method Description doublecalculateCategoryAgreement(java.lang.Object category)Calculates the inter-rater agreement for the given annotation category based on the object's annotation study that has been passed to the class constructor.doublecalculateItemAgreement(ICodingAnnotationItem item)Calculates the inter-rater agreement for the given annotation item.Methods inherited from class org.dkpro.statistics.agreement.coding.CodingAgreementMeasure
calculateObservedAgreement, doCalculateItemAgreement, ensureTwoRaters, warnIfMissingValuesMethods inherited from class org.dkpro.statistics.agreement.AgreementMeasure
calculateAgreement, calculateExpectedAgreementMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.dkpro.statistics.agreement.IAgreementMeasure
calculateAgreement
-
Constructor Details
-
PercentageAgreement
Initializes the instance for the given annotation study. The study should never be null.
-
-
Method Details
-
calculateItemAgreement
Calculates the inter-rater agreement for the given annotation item. This is the basic step that is performed for each item of an annotation study, when callingAgreementMeasure.calculateAgreement().- Specified by:
calculateItemAgreementin interfaceIItemSpecificAgreement<ICodingAnnotationItem>- Throws:
java.lang.NullPointerException- if the given item is null.- See Also:
IItemSpecificAgreement
-
calculateCategoryAgreement
public double calculateCategoryAgreement(java.lang.Object category)Calculates the inter-rater agreement for the given annotation category based on the object's annotation study that has been passed to the class constructor.- Specified by:
calculateCategoryAgreementin interfaceICategorySpecificAgreement- Throws:
java.lang.NullPointerException- if the study is null or the given category is null.java.lang.ArrayIndexOutOfBoundsException- if the study does not contain the given category.java.lang.ArithmeticException- if the study does not contain annotations for the given category.- See Also:
ICategorySpecificAgreement
-