Allow supertypes for Layers
Hi there,
we are currently using Inception for our annotations, and we love it! We are currently missing something, we are not sure whether this is a bug, a missing feature, or that we haven't found out yet how to do it.
Is your feature request related to a problem? Please describe.
We would like to be able to specify supertypes when using the Layers. In the CAS format, this is possible. We would like to be able to create a new Layer, called, for example "Fruit" with Features: juicyness, ripeness, and then create another Layer called "Apple" with the same Features, without having to specify that. Also, this has the advantage that when we export the annotations to work with them later (in python, with cassis), we can just select all the "Fruit" annotations, without having to look for each single fruit. Is this in any way possible?
Describe the solution you'd like
Add a button in Layer Details to specify a parent, then add all the Features from the parent to the child, and specify a parent for the child
Describe alternatives you've considered
We have also tried to export the Inception TypeSystem, import it in python to modify it with cassis, add the Layers that we would like as children of de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity, and then tried to do an export, but unfortunately the supertypeName always becomes uima.tcas.Annotation anyways, so that does not work. As far as I can see from the minimal look that I had at the code (e.g. https://github.com/inception-project/inception/blob/main/inception/inception-schema/src/main/java/de/tudarmstadt/ukp/inception/schema/exporters/LayerExporter.java#L268, am I looking at the correct file?) the superclass information is never stored anywhere.
We have also tried using the TypeSystem that we created with cassis with the exported documents, but that also does not work, since types like de.tudarmstadt.ukp.dkpro.core.api.metadata.type.DocumentMetaData are not there (are they added to the typesystem during the export?).
Thank you very much for your time and your help!
Best, Giulia & @karzideh
the layer concept in INCEpTION uses a flat list without any kind of inheritance. INCEpTION does currently not allow creating sub-layers (UIMA subtypes). There is at least one bug related to the use of subtypes in the current implementation.
https://github.com/inception-project/inception/issues/1537
Also, there is currently no way to import an externally manufactured UIMA type system into INCEpTION in such a way that subtype relationships would be supported. When importing a UIMA typesystem into INCEpTION, it does not really use the type system as-is. Instead, INCEpTION tries to analyze the type system and to create layers corresponing to the types and features in the given type system as good as it can.
That said, you could post-process your data after the export from INCEpTION and coerce it into a compatible type system that contains subtypes. E.g. you could introduce a common super-type to a bunch of layers into the type system after the export for the purpose of processing the files in cassis.
WRT to the DocumentMetaData missing from an exported type system - that sounds like a bug. Maybe you could open a separate issue for that saying what exactly you tried so we can try to reproduce it?