Package org.dkpro.statistics.agreement
Class AnnotationUnit
java.lang.Object
org.dkpro.statistics.agreement.AnnotationUnit
- All Implemented Interfaces:
java.io.Serializable,IAnnotationUnit
- Direct Known Subclasses:
UnitizingAnnotationUnit
public class AnnotationUnit extends java.lang.Object implements IAnnotationUnit
Default implementation of
IAnnotationUnit holding the rater's index and the category that
the rater assigned to this unit.- Author:
- Christian M. Meyer
- See Also:
IAnnotationStudy,IAnnotationUnit, Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AnnotationUnit(int raterIdx, java.lang.Object category)Initializes the annotation unit with the given category as the annotation by the rater with the specified index. -
Method Summary
Modifier and Type Method Description java.lang.ObjectgetCategory()Returns the category assigned to this unit by one of the raters.intgetRaterIdx()Returns the index of the rater who coded this unit (in case of a coding study) or defined the boundaries of this unit (in case of a unitizing study).java.lang.StringtoString()
-
Field Details
-
Constructor Details
-
AnnotationUnit
public AnnotationUnit(int raterIdx, java.lang.Object category)Initializes the annotation unit with the given category as the annotation by the rater with the specified index.
-
-
Method Details
-
getRaterIdx
public int getRaterIdx()Description copied from interface:IAnnotationUnitReturns the index of the rater who coded this unit (in case of a coding study) or defined the boundaries of this unit (in case of a unitizing study). The first rater has index 0.- Specified by:
getRaterIdxin interfaceIAnnotationUnit
-
getCategory
public java.lang.Object getCategory()Description copied from interface:IAnnotationUnitReturns the category assigned to this unit by one of the raters. The category might be null if, and only if, the unit represents a missing value (in case of a coding study) or a gap (in case of a unitizing study).- Specified by:
getCategoryin interfaceIAnnotationUnit
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-