How can we group all annotations between two annotations?
I'm new to GATE and am trying to group annotations together , Not sure if we can do this , Please help. For Example In the following text :
Page-1
Age:53
Person: Nathan
Page-2
Treatment : Initial Evaluation
History: Yes
Page-3
..........
If my Gazetteer list consists of different tags, page tag for each page number, age, person, Treatment, History etc. I want to group all tags from Page-1 to Page-2 under Page-1 Annotation and all tags between Page-2 and Page-3 under Page-2.
Please let me know if more information required on this question.
Thanks in advance.
I'm not entirely sure what you mean by "group together" but you can certainly create annotations that span across the content of each "page". Assuming you have a
PageNumber
annotation on each "Page-1", "Page-2" etc. then you can use something like this to create annotations spanning from onePageNumber
to the next. I'm using acontrol = once
JAPE to do this, you could equivalently use a Groovy script or a custom PRIn your comment you ask about moving all the annotations under each "page" into a separate annotation set. This would be relatively straightforward once you have done the above, and if you have the page number as a feature on your
Page
annotations as I have done with the "id" feature. Then you could define another JAPE that does something like this: