Hi all!

In UIMA 2.1 it is possible to create a sub-iterator in order to iterate over annotations which are within the begin-end span of the selected type.

For example:

AnnotationIndex sentenceIndex = (AnnotationIndex) aJCas .getJFSIndexRepository().getAnnotationIndex(Sentence.type);

AnnotationIndex tokenIndex = (AnnotationIndex) aJCas
               .getJFSIndexRepository().getAnnotationIndex(Token.type);

       // iterate over Sentences
       FSIterator sentenceIterator = sentenceIndex.iterator();
       while (sentenceIterator.hasNext()) {

           Sentence sentence = (Sentence) sentenceIterator.next();

           // iterate over Tokens
           FSIterator tokenIterator = tokenIndex.subiterator(sentence);


I would like to have a more extended functionality. I need to know the annotations which are in the span of begin-end of the selected annotation type. These annotations can overlap the span of the selected type.

For example noun phrases. If I iterate over tokens, I would like to know, if this token is inside a noun phrase or not. Now, I am working with Hashtables. But I am looking for an other solution.

How could I solve this problem?

Bets regards

Ekaterina




--

Ekaterina Buyko
Jena University Language and Information Engineering (JULIE) Lab
Phone: +49-3641-944322
Fax:   +49-3641-944321
email: [EMAIL PROTECTED]
URL:   http://www.julielab.de

Reply via email to