Hello Keith, long time no see. How do you do?
What is the best way to represent a tree and/or DAG in UIMA? Currently we declare an annotation type with two special features, children and ancestor, that are arrays of annotations. We then populate these arrays with the children and ancestor annotations.
There are some methods in UIMA to create a tree structure by analysing how annotations cover each other, but this is not helpful here, since an explicit declaration of dominance is required. The type systems I do it in the same manner you do, only they may use just a "children" or just a "parents" feature and assume that an edge is always directed from parent to child - thus having both would be redundant.
Actually the CAS is a DAG. You have an edge whenever a feature structure references another feature structure. I think the only thing you do here is to reserve two features of a particular type of feature structure to represent dominance.
Since I suppose you need to represent GrAF in the CAS it may be sensible to make edges a bit more explicit by elevating them to a feature structure type. So your "parent", "children" or maybe "coref" features would be arrays of a subtype of Edge instead of a subtype of say Constituent and thus the edge could bear features.
I am pretty sure this is already more or less how you handle things, so in reiterating it I am probably only expressing that I do not know of any better idea either.
Cheers, Richard -- ------------------------------------------------------------------- Richard Eckart de Castilho Software Engineer Ubiquitous Knowledge Processing Lab FB 20 Computer Science Department Technische Universität Darmstadt Hochschulstr. 10, D-64289 Darmstadt, Germany phone +49 (6151) 16 - 6218, fax -5455, room S2/02/E225 [email protected] www.ukp.tu-darmstadt.de -------------------------------------------------------------------
