public class OverlapAnnotator
extends JCasAnnotator_ImplBase
Modifier and Type | Class and Description |
---|---|
(package private) static interface |
OverlapAnnotator.Action
Generic interface for performing an action if the overlap constraint is
met between annotations A and B.
|
(package private) class |
OverlapAnnotator.DeleteActionImpl
Implementation that deletes either the A, B, or both.
|
(package private) class |
OverlapAnnotator.ModifyActionImpl
Implementation that modifies feature values of either annotation A or B.
|
Modifier and Type | Field and Description |
---|---|
private int |
iv_aAnnotType |
private OverlapAnnotator.Action |
iv_action |
private int |
iv_bAnnotType |
private Logger |
iv_logger |
private java.util.BitSet |
iv_typesOfOverlapToProcess |
private int |
NUM_OVERLAP_BITS |
static byte |
OVERLAP_A_ENV_B
A completely envelopes B
|
static byte |
OVERLAP_B_ENV_A
B completely envelopes A
|
static byte |
OVERLAP_EXACT
A and B have identical offsets
|
static byte |
OVERLAP_NONE
No overlap at all between A and B
|
static byte |
OVERLAP_PARTIAL
A and B only partially overlap
|
Constructor and Description |
---|
OverlapAnnotator() |
Modifier and Type | Method and Description |
---|---|
private OverlapAnnotator.Action |
buildDeleteAction(java.lang.String[] argArr)
Builds a DeleteAction implementation.
|
private OverlapAnnotator.Action |
buildModifyAction(java.lang.String[] argArr)
Builds a ModifyAction implementation.
|
private java.util.BitSet |
getOverlapType(Annotation a,
Annotation b)
Determines the type of overlap between annotations A and B.
|
void |
initialize(UimaContext annotCtx) |
private void |
parseOverlapTypeString(java.lang.String str)
Parses the overlap type string and populates the user bitset.
|
void |
process(JCas jcas) |
private java.util.List<Annotation> |
storeAnnotationsToList(JFSIndexRepository indexes,
int annotType)
create a list of the annotations of the given type
|
private Logger iv_logger
public static final byte OVERLAP_NONE
public static final byte OVERLAP_PARTIAL
public static final byte OVERLAP_EXACT
public static final byte OVERLAP_A_ENV_B
public static final byte OVERLAP_B_ENV_A
private final int NUM_OVERLAP_BITS
private java.util.BitSet iv_typesOfOverlapToProcess
private int iv_aAnnotType
private int iv_bAnnotType
private OverlapAnnotator.Action iv_action
public void initialize(UimaContext annotCtx) throws ResourceInitializationException
ResourceInitializationException
private void parseOverlapTypeString(java.lang.String str) throws java.lang.Exception
str
- java.lang.Exception
private OverlapAnnotator.Action buildModifyAction(java.lang.String[] argArr) throws java.lang.Exception
argArr
- java.lang.Exception
private OverlapAnnotator.Action buildDeleteAction(java.lang.String[] argArr) throws java.lang.Exception
argArr
- java.lang.Exception
public void process(JCas jcas) throws AnalysisEngineProcessException
AnalysisEngineProcessException
private java.util.List<Annotation> storeAnnotationsToList(JFSIndexRepository indexes, int annotType)
indexes
- annotType
- private java.util.BitSet getOverlapType(Annotation a, Annotation b)
a
- b
-