You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

This page describes additional UIMA Version 3 iterator support for accessing Feature Structures.  It draws on the uimaFIT design, with these goals:

  • uniformity (ease of learning)
  • conciseness (in expression)
  • alignment with / exploitation of Java 8 styles, including streams
  • hiding implementation internals

 

uv3 fs iteration design

Translations of uimaFIT select methods to the new API

select(FSArray, Class<T>)
myArray.select(Token.class)

select(FSList, Class<T>)

myList.select(Token.class)
select(JCas, Class<T>)
jcas.select(Token.class)

selectAll(JCas)

jcas.select()
selectAt(JCas, Class<T>, int, int)
jcas.select(Token.class).at(begin end)
selectBetween(Class<T>, AnnotationFS, AnnotationFS)

 

For description, see selectBetween(JCas, Class<T>, AnnotationFS, AnnotationFS) below.

Example same as selectBetween(JCas, Class<T>, AnnotationFS, AnnotationFS) below unless we introduce a static method.

selectBetween(JCas, Class<T>, AnnotationFS, AnnotationFS)

 

jcas.select(Token.class).startAt(fs1).endAt(fs2) // this looks more like index positions...
jcas.select(Token.class).between(fs1, fs2) // might make more sense because we are using offsets, not index positions
selectByIndex(JCas, Class<T>, int)
jcas.select(Token.class).at(indexPosition)
selectCovered(Class<T>, AnnotationFS)

Get a list of annotations of the given annotation type constrained by a 'covering' annotation. Iterates over all annotations of the given type to find the covered annotations. Does not use subiterators.

The covering annotation is never returned itself, even if it is of the queried-for type or a subtype of that type.

Same as selectCovered(JCas, Class<T>, AnnotationFS) below unless we introduce a static method.

selectCovered(JCas, Class<T>, AnnotationFS)
jcas.select(Token.class).within(contextAnnotation)
selectCovered(JCas, Class<T>, int, int)
jcas.select(Token.class).within(1,3)
selectCovering(Class<T>, AnnotationFS)
 
selectCovering(JCas, Class<T>, AnnotationFS)
 
selectCovering(JCas, Class<T>, int, int)
 
selectFollowing(Class<T>, AnnotationFS, int)
 
selectFollowing(JCas, Class<T>, AnnotationFS, int)
 
selectPreceding(Class<T>, AnnotationFS, int)
 
selectPreceding(JCas, Class<T>, AnnotationFS, int)
 
selectSingle(JCas, Class<T>)
 
selectSingleAt(JCas, Class<T>, int, int)
 
selectSingleRelative(Class<T>, AnnotationFS, int)
 
selectSingleRelative(JCas, Class<T>, AnnotationFS, int)
 
  • No labels