Class CodingAnnotationItem
java.lang.Object
org.dkpro.statistics.agreement.coding.CodingAnnotationItem
- All Implemented Interfaces:
java.io.Serializable,ICodingAnnotationItem,IAnnotationItem
public class CodingAnnotationItem extends java.lang.Object implements ICodingAnnotationItem
Default implementation of
ICodingAnnotationItem holding the set of annotation units for
this item (i.e., the categories assigned to this item by all raters). When using the default
implementation, it is recommended to use CodingAnnotationStudy.addItem(Object...) instead
of instantiating this type.- Author:
- Christian M. Meyer
- See Also:
CodingAnnotationStudy,ICodingAnnotationItem, Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected intnonNullCountprotected java.util.List<IAnnotationUnit>units -
Constructor Summary
Constructors Modifier Constructor Description protectedCodingAnnotationItem(int unitCount)Initializes the item for the given number of units. -
Method Summary
Modifier and Type Method Description protected voidaddUnit(IAnnotationUnit unit)Adds the given unit to the coding study.intgetRaterCount()Returns the number of raters who annotated this item with a non-null category.IAnnotationUnitgetUnit(int raterIdx)Returns the annotation unit of the rater with the specified index.java.lang.Iterable<IAnnotationUnit>getUnits()Returns all coding units for this annotation item (i.e., the categories assigned by the individual raters).java.lang.StringtoString()
-
Field Details
-
units
-
nonNullCount
protected int nonNullCount
-
-
Constructor Details
-
CodingAnnotationItem
protected CodingAnnotationItem(int unitCount)Initializes the item for the given number of units. Normally, the methodCodingAnnotationStudy.addItem(Object...)should be used to define the annotation units of an item.
-
-
Method Details
-
addUnit
Adds the given unit to the coding study. Normally, the methodCodingAnnotationStudy.addItem(Object...)should be used to define the annotation units of an item. -
getUnit
Description copied from interface:ICodingAnnotationItemReturns the annotation unit of the rater with the specified index. That is, the object holding the category assigned to the item by the specified rater.- Specified by:
getUnitin interfaceICodingAnnotationItem
-
getUnits
Description copied from interface:ICodingAnnotationItemReturns all coding units for this annotation item (i.e., the categories assigned by the individual raters).- Specified by:
getUnitsin interfaceICodingAnnotationItem
-
getRaterCount
public int getRaterCount()Description copied from interface:ICodingAnnotationItemReturns the number of raters who annotated this item with a non-null category.- Specified by:
getRaterCountin interfaceICodingAnnotationItem
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-