Overview   Class List   Class Hierarchy   Class Members   Functions & Constants   Defines   Header Files  

Predefined Indexes

Most applications and annotators will be just use some some "natural" way to iterate over the data in the feature structures in the FSStore.

For annotation feature structures this is the linear text order with some special sorting for annotations that start at the same position in the text.

For vocabulary feature structures a sort order based on lemma string and part of speech is the most accepted one.

Those "natural" indexes are predefined in the CAS and can be accessed using the functions described here.

For example to access tokens using the index over token annotations write:

 Type tokType = cas.getTypeSystem().getType(TT::TYPE_NAME_TOKEN_ANNOTATION);
 ANIndex tokIdx = cas.getAnnotationIndex(tokType);
 ANIterator tokIter = tokIdx.iterator();
 while(tokIter.isValid()) {
    AnnotationFS tokFS = tokIter.get();
    // ... do some processing with tokFS ...
    tokIter.moveToNext();
 }
 


Generated on Tue Dec 15 17:13:10 2009 for UIMACPP API by  doxygen 1.3.9.1