Class UnitizingAnnotationUnit

java.lang.Object
org.dkpro.statistics.agreement.AnnotationUnit
org.dkpro.statistics.agreement.unitizing.UnitizingAnnotationUnit
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<IUnitizingAnnotationUnit>, IAnnotationUnit, IUnitizingAnnotationUnit

public class UnitizingAnnotationUnit
extends AnnotationUnit
implements IUnitizingAnnotationUnit
Default implementation of IUnitizingAnnotationUnit holding the rater's index and the category that the rater assigned to this unit as well as the position of the annotation unit within the continuum of an annotation study. When using the default implementation, it is recommended to use UnitizingAnnotationStudy.addUnit(long, long, int, Object) instead of instantiating this type.
Author:
Christian M. Meyer
See Also:
UnitizingAnnotationStudy, IUnitizingAnnotationUnit, Serialized Form
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected long length  
    protected long offset  

    Fields inherited from class org.dkpro.statistics.agreement.AnnotationUnit

    category, raterIdx
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected UnitizingAnnotationUnit​(long offset, long length, int raterIdx, java.lang.Object category)
    Initializes the unit with the given offset and length as well as the category assigned to the unit by the rater with the specified index.
  • Method Summary

    Modifier and Type Method Description
    int compareTo​(IUnitizingAnnotationUnit that)  
    long getEndOffset()
    Returns the right delimiter of the annotation unit (i.e., the end position of the identified segment).
    long getLength()
    Returns the length of the annotation unit (i.e., the difference between the end and start position of the identified segment).
    long getOffset()
    Returns the offset of the annotation unit (i.e., the start position of the identified segment).
    java.lang.String toString()  

    Methods inherited from class org.dkpro.statistics.agreement.AnnotationUnit

    getCategory, getRaterIdx

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.dkpro.statistics.agreement.IAnnotationUnit

    getCategory, getRaterIdx