public class UIMAUtils extends Object
| Constructor and Description |
|---|
UIMAUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends org.apache.uima.jcas.tcas.Annotation> |
getAnnotations(org.apache.uima.jcas.JCas jCas,
org.apache.uima.jcas.tcas.Annotation windowAnnotation,
Class<T> cls)
This method returns all annotations (in order) that are inside a "window"
annotation of a particular kind.
|
static <T extends org.apache.uima.jcas.tcas.Annotation> |
getExactAnnotations(org.apache.uima.jcas.JCas jCas,
org.apache.uima.jcas.tcas.Annotation windowAnnotation,
Class<T> cls)
same as getAnnotations however boundaries for windowAnnotation and cls
must exactly match!
|
static boolean |
hasSameOffset(org.apache.uima.jcas.tcas.Annotation a,
org.apache.uima.jcas.tcas.Annotation b)
check whether two annotation have exactly the same offset
|
public static <T extends org.apache.uima.jcas.tcas.Annotation> List<T> getAnnotations(org.apache.uima.jcas.JCas jCas, org.apache.uima.jcas.tcas.Annotation windowAnnotation, Class<T> cls)
T - determines the return type of the methodjCas - the current jCas or viewwindowAnnotation - an annotation that defines a windowcls - determines the return type of the methodAnnotationIndex.subiterator(org.apache.uima.cas.text.AnnotationFS)public static <T extends org.apache.uima.jcas.tcas.Annotation> List<T> getExactAnnotations(org.apache.uima.jcas.JCas jCas, org.apache.uima.jcas.tcas.Annotation windowAnnotation, Class<T> cls)
T - jCas - windowAnnotation - cls - public static boolean hasSameOffset(org.apache.uima.jcas.tcas.Annotation a,
org.apache.uima.jcas.tcas.Annotation b)
a - annotation 1b - annotation 2Copyright © 2018 JULIE Lab, Germany. All Rights Reserved.