Java – access annotations in UIMA

Is there any way in UIMA to access annotations from tokens as they are in the CAS debugger GUI? Of course you can access all comments from the index repository, but I want to recycle tags and get all associated comments for each tag

The reason is simple. I want to check some comments and discard others, which is much easier Any help expressed appreciation:)

Solution

I am a uimafit developer

If you want to find all annotations within the boundaries of another annotation, you may prefer a shorter and faster variant

JCasUtil.selectCovered(referenceAnnotation,<T extends ANNOTATION>);

Note that it is not a good idea to create a "virtual" comment with the required offset and search within its boundaries, because this will immediately allocate memory in CAS and will not be garbage collected unless the complete CAS is collected

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>