dkpro / dkpro-cassis

UIMA CAS processing library written in Python
https://pypi.org/project/dkpro-cassis/
Apache License 2.0
85 stars 22 forks source link

How to prase event information annotation ? #320

Closed thetaaaaa closed 3 months ago

thetaaaaa commented 3 months ago

Is your feature request related to a problem? Please describe.

Here is some annotation for events in text , an event annotation consists of event trigger word, event role and role type. With dkpro-cassis, I can only have access to the event trigger word's feature but have no way to have access to the element's feature. How am I suppose to do that ?
image Describe the solution you'd like A clear and concise description of what you want to happen. I want to have access to arguments and its elements(which are in u.c.FSArray) and their text through the feature of w.c.Trigger in my case. Thank you. Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

reckart commented 3 months ago

Try

for element in trigger.arguments.elements:

or

for element in trigger.get('arguments').elements:
thetaaaaa commented 3 months ago

Both of them works, thanks ! image