uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SAITO, Isao Isaac" <1...@1995.sfc.ne.jp>
Subject question: how to get order of annotations created by previous annotators?
Date Tue, 15 Jan 2008 01:17:51 GMT
hi all,

I am trying to develop an aggregate analysis engine.
The annotator run at the end (called annotator-end) wants to get
all annotations created by the previous annotators(annotators-prev),
as same order in given document(data that can be acquired by
Could anyone tell me how to do this?

For example of what I want,
 - 2 types of Annotation(PrefixAnnot, SuffixAnnot) are in use
 - by annotators-prev, more than 1 annotations are created using
Annotation above
 - annotator-end wants to get a SuffixAnnot everytime after any
PrefixAnnot comes

In <code a> shown below, annotation instances can be acquired only
with respect to the class and the order is not available as far as I


<code a>
FSIndex prefixIndex = aJCas.getAnnotationIndex(PrefixAnnot.type);
Iterator prefixIter = prefixIndex.iterator();
while (prefixIter.hasNext()) {
  PrefixAnnot prefix = (PrefixAnnot)prefixIter.next();

FSIndex suffixIndex = aJCas.getAnnotationIndex(SuffixAnnot.type);
Iterator suffixIter = suffixIndex.iterator();
while (suffixIter.hasNext()) {
  SuffixAnnot suffix = (SuffixAnnot)suffixIter.next();
</code a>

View raw message