public class FeaturePathUtils extends Object
Constructor and Description |
---|
FeaturePathUtils() |
Modifier and Type | Method and Description |
---|---|
static FeaturePathFactory.FeaturePathIterator<org.apache.uima.cas.text.AnnotationFS> |
featurePathIterator(org.apache.uima.jcas.JCas aJCas,
String featurePath,
Optional<org.apache.uima.cas.text.AnnotationFS> coveringAnnotation)
Returns a
FeaturePathFactory.FeaturePathIterator
over all annotations of the given feature path. |
static org.apache.uima.cas.Type |
getType(org.apache.uima.cas.TypeSystem typeSystem,
String typeName)
Get the
Type for a given name from a TypeSystem . |
public static FeaturePathFactory.FeaturePathIterator<org.apache.uima.cas.text.AnnotationFS> featurePathIterator(org.apache.uima.jcas.JCas aJCas, String featurePath, Optional<org.apache.uima.cas.text.AnnotationFS> coveringAnnotation) throws FeaturePathException
FeaturePathFactory.FeaturePathIterator
over all annotations of the given feature path.
If the optional coveringAnnotation is set, the iterator contains only annotations of the feature path that are covered by the covering annotation (e.g. a sentence instance).
aJCas
- a JCas
featurePath
- a string representation of a feature path, for instance de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Token
coveringAnnotation
- an Optional containing an AnnotationFS
or nothing.FeaturePathFactory.FeaturePathIterator
of type AnnotationFS
FeaturePathException
- if an error occurs during initialization of the feature pathpublic static org.apache.uima.cas.Type getType(org.apache.uima.cas.TypeSystem typeSystem, String typeName)
Type
for a given name from a TypeSystem
. Throws a IllegalStateException
if the type name cannot be resolved.typeSystem
- the TypeSystem
typeName
- the type nameType
IllegalStateException
- if the type name cannot be resolvedCopyright © 2007–2018 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.