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
JCas#getDocumentText()).
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
know.

Thanks,
 Isaac

<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>

Reply via email to