public class UnitizingAnnotationStudy extends AnnotationStudy implements IUnitizingAnnotationStudy
IUnitizingAnnotationStudy
interface.
Instantiate this class for representing the annotation units of a
unitizing study (i.e., an annotation setup in which the (human) raters
are asked to identify the boundaries of the annotation units themselves).
The standard way of representing the annotation units is using the
addUnit(long, long, int, Object)
method for each identified
segment by each rater.IUnitizingAnnotationStudy
,
IUnitizingAnnotationUnit
Modifier and Type | Field and Description |
---|---|
protected long |
begin |
protected long |
length |
protected Set<IUnitizingAnnotationUnit> |
units |
categories, raters
Constructor and Description |
---|
UnitizingAnnotationStudy(int raterCount,
int length)
Initializes and empty annotation study for a unitizing task with the
given number of raters.
|
UnitizingAnnotationStudy(int raterCount,
long begin,
long length)
Initializes and empty annotation study for a unitizing task with the
given number of raters.
|
Modifier and Type | Method and Description |
---|---|
void |
addUnit(IUnitizingAnnotationUnit unit)
Add the given annotation unit to this study.
|
IUnitizingAnnotationUnit |
addUnit(long offset,
long length,
int raterIdx,
Object category)
Creates a new
UnitizingAnnotationUnit and adds it to the
present annotation study. |
protected IUnitizingAnnotationUnit |
createUnit(long offset,
long length,
int raterIdx,
Object category) |
static IUnitizingAnnotationUnit |
findNextUnit(Iterator<IUnitizingAnnotationUnit> units,
int raterIdx)
Utility method for moving on the cursor of the given iterator until
a unit of the specified rater is returned.
|
static IUnitizingAnnotationUnit |
findNextUnit(Iterator<IUnitizingAnnotationUnit> units,
int raterIdx,
Object category)
Utility method for moving on the cursor of the given iterator until
a unit of the specified rater and category is returned.
|
static IUnitizingAnnotationUnit |
findNextUnit(Iterator<IUnitizingAnnotationUnit> units,
Object category)
Utility method for moving on the cursor of the given iterator until
a unit of the specified category is returned.
|
long |
getContinuumBegin()
Returns the begin of the continuum (i.e., the first offset that
is considered valid for annotation units).
|
long |
getContinuumLength()
Returns the length of the continuum (i.e., the last possible
right delimiter of an annotation unit).
|
int |
getUnitCount()
Returns the number of annotation units defined by the study.
|
Iterable<IUnitizingAnnotationUnit> |
getUnits()
Allows iterating all annotation units of this study.
|
addCategory, addRater, findRater, getCategories, getCategoryCount, getRaterCount, isDichotomous
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCategories, getCategoryCount, getRaterCount, isDichotomous
protected Set<IUnitizingAnnotationUnit> units
protected long begin
protected long length
public UnitizingAnnotationStudy(int raterCount, int length)
public UnitizingAnnotationStudy(int raterCount, long begin, long length)
public void addUnit(IUnitizingAnnotationUnit unit)
UnitizingAnnotationUnit
, it is recommended to use
addUnit(long, long, int, Object)
instead.public IUnitizingAnnotationUnit addUnit(long offset, long length, int raterIdx, Object category)
UnitizingAnnotationUnit
and adds it to the
present annotation study. The parameters define the position
of the unit within the continuum (indicated by the offset/start position
and the length of the unit), the rater who identified this unit and
the category assigned to it. If the unitzing study does not
distinguish any categories, use some dummy object, such as "X"
to distinguish identified units from gaps (i.e., units whose
category is null).protected IUnitizingAnnotationUnit createUnit(long offset, long length, int raterIdx, Object category)
public Iterable<IUnitizingAnnotationUnit> getUnits()
IUnitizingAnnotationStudy
getUnits
in interface IUnitizingAnnotationStudy
public int getUnitCount()
IAnnotationStudy
getUnitCount
in interface IAnnotationStudy
public static IUnitizingAnnotationUnit findNextUnit(Iterator<IUnitizingAnnotationUnit> units, int raterIdx)
public static IUnitizingAnnotationUnit findNextUnit(Iterator<IUnitizingAnnotationUnit> units, Object category)
public static IUnitizingAnnotationUnit findNextUnit(Iterator<IUnitizingAnnotationUnit> units, int raterIdx, Object category)
public long getContinuumBegin()
IUnitizingAnnotationStudy
getContinuumBegin
in interface IUnitizingAnnotationStudy
public long getContinuumLength()
IUnitizingAnnotationStudy
getContinuumLength
in interface IUnitizingAnnotationStudy
Copyright © 2011–2015 Ubiquitous Knowledge Processing (UKP) Lab. All rights reserved.