public class UnitizingAnnotationUnit extends AnnotationUnit implements IUnitizingAnnotationUnit
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.UnitizingAnnotationStudy,
IUnitizingAnnotationUnit| Modifier and Type | Field and Description |
|---|---|
protected long |
length |
protected long |
offset |
category, raterIdx| Modifier | Constructor and Description |
|---|---|
protected |
UnitizingAnnotationUnit(long offset,
long length,
int raterIdx,
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.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(IUnitizingAnnotationUnit that) |
boolean |
equals(Object obj) |
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).
|
int |
hashCode() |
String |
toString() |
getCategory, getRaterIdxclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCategory, getRaterIdxprotected UnitizingAnnotationUnit(long offset,
long length,
int raterIdx,
Object category)
UnitizingAnnotationStudy.addUnit(long,
long, int, Object) should be used to define the annotation units.public long getOffset()
IUnitizingAnnotationUnitgetOffset in interface IUnitizingAnnotationUnitpublic long getLength()
IUnitizingAnnotationUnitgetLength in interface IUnitizingAnnotationUnitpublic long getEndOffset()
IUnitizingAnnotationUnitIUnitizingAnnotationUnit.getOffset() + IUnitizingAnnotationUnit.getLength().getEndOffset in interface IUnitizingAnnotationUnitpublic int compareTo(IUnitizingAnnotationUnit that)
compareTo in interface Comparable<IUnitizingAnnotationUnit>public String toString()
toString in class AnnotationUnitCopyright © 2011–2015 Ubiquitous Knowledge Processing (UKP) Lab. All rights reserved.