public static class CleartkExtractor.Preceding extends Object
CleartkExtractor.Context for extracting annotations appearing before the focus annotation.| Constructor and Description |
|---|
CleartkExtractor.Preceding(int end)
Constructs a context that will extract features over the preceding N annotations.
|
CleartkExtractor.Preceding(int begin,
int end)
Constructs a context that will extract features over a slice of the preceding N annotations.
|
| 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.Preceding(int end)
end - The number of annotations to extract.public CleartkExtractor.Preceding(int begin, int end)
begin and end indexes count from 0, where index 0 identifies the
annotation immediately preceding the focus annotation. If either index is greater than the
index of the earliest possible 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.