public static class CleartkExtractor.LastCovered extends Object
CleartkExtractor.Context for extracting the last annotations within the focus annotation.| Constructor and Description |
|---|
CleartkExtractor.LastCovered(int end)
Constructs a context that will extract features over the last N annotations within the focus
annotation.
|
CleartkExtractor.LastCovered(int begin,
int end)
Constructs a context that will extract features over a slice of the last N annotations within
the focus annotation.
|
| Modifier and Type | Method and Description |
|---|---|
protected <T extends Annotation> |
select(JCas jCas,
Annotation focusAnnotation,
Class<T> annotationClass,
int count)
Select annotations of the given type in the context of the focus annotation.
|
public CleartkExtractor.LastCovered(int end)
end - The number of annotations to extract.public CleartkExtractor.LastCovered(int begin, int end)
begin and end indexes count from 0, where index 0 identifies the last
annotation within the focus annotation. If either index is greater than the index of the
first annotation within the focus annotation, special "out of bounds" features will be added
for each annotation that was requested but absent.begin - The index of the first annotation to include.end - The index of the last annotation to include. Must be greater than begin.protected <T extends Annotation> List<T> select(JCas jCas, Annotation focusAnnotation, Class<T> annotationClass, int count)
jCas - The JCas containing the focus annotation.focusAnnotation - The annotation whose context is to be searched.annotationClass - The type of annotation to be found in the context.count - The number of annotations to select. A smaller number may be returned if it is not
possible to select the requested number.Copyright © 2014. All rights reserved.