javanlpgate

Is it possible to retrieve the entire list of named AnnotationSets in GATE?


is it possible to retrieve the entire list of an Annotation Set in GATE? This line of code returns all the items of a GATE document that belong to the AnnotationSet called "EMail";

AnnotationSet annSet = doc.getAnnotations().get("EMail");

Now, how can I know all of the Annotations' Set names instead of the only "EMail"?


Solution

  • Isn't this the answer to your question:

    AnnotationSet annSet = doc.getAnnotations();
    

    I think you mix two different terms: annotation set and annotation type. Be careful about these two...

    There are several methods of gate.Document and gate.AnnotationSet that can be used:

    See more details in javadoc: