inception
inception copied to clipboard
Cannot add relations that points to the same entitiy from curation / curation-in-annotation but can add the relation manually
Describe the bug Cannot add relations that points to the same entitiy from curation / curation-in-annotation but can add the relation manually. It seems that two relations pointing to the same entity are considered the same annotation, regardless of the way the overlap is considered (I configured as Any (stacked and overlapping)) in the layer configuration.
To Reproduce Steps to reproduce the behavior:
-
create a new project and load the following layers: layers.zip, there is one layer of tags and one layer of relations
-
Load a document
-
Go to Annotation
-
Add three annotations, create a link from two of them to the third

-
Set the document as completed
-
Open Curation

-
Try to A) merge all the annotations or B) add the annotations manually (see screenrecording linked below)
-
Only one can be added, the other will results in
Error: The annotation already exists
-
If you add the relation manually, it will work.

Expected behaviour To be able to add relations that point to the same annotation
Screenshots See a screen recording https://send.firefox.com/download/32749fe4e42d98b5/#JlIvSYblwVxwk6OC-f-TdQ (valid only 7 days)
Please complete the following information:
- Version and build ID: 0.16.1 (2020-06-19 14:59:14, build 654f8cda574ca2d5de85829a972b2ae33928b5da)
- OS: Linux
- Browser: Firefox (I know it's not supported officially - Chrome has the same behaviour)
Additional context The same problem appears with the curation-in-annotation view
Presently de.tudarmstadt.ukp.clarin.webanno.curation.casmerge.CasMerge.mergeRelationAnnotation(SourceDocument, String, AnnotationLayer, CAS, AnnotationFS, boolean) does not take the overlap setting into account at all. So that method needs to be fixed/enhanced to consider the overlap setting. Probably the same applies to de.tudarmstadt.ukp.clarin.webanno.curation.casmerge.CasMerge.mergeSpanAnnotation(SourceDocument, String, AnnotationLayer, CAS, AnnotationFS, boolean).