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

    Fields 
    Modifier and Type Field Description
    protected java.lang.Object category  
    protected int raterIdx  
  • 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.Object getCategory()
    Returns the category assigned to this unit by one of the raters.
    int getRaterIdx()
    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.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • raterIdx

      protected int raterIdx
    • category

      protected java.lang.Object category
  • 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: IAnnotationUnit
      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). The first rater has index 0.
      Specified by:
      getRaterIdx in interface IAnnotationUnit
    • getCategory

      public java.lang.Object getCategory()
      Description copied from interface: IAnnotationUnit
      Returns 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:
      getCategory in interface IAnnotationUnit
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object