inception icon indicating copy to clipboard operation
inception copied to clipboard

Cannot add relations that points to the same entitiy from curation / curation-in-annotation but can add the relation manually

Open lfoppiano opened this issue 5 years ago • 1 comments

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:

  1. create a new project and load the following layers: layers.zip, there is one layer of tags and one layer of relations

  2. Load a document

  3. Go to Annotation

  4. Add three annotations, create a link from two of them to the third image

  5. Set the document as completed

  6. Open Curation image

  7. Try to A) merge all the annotations or B) add the annotations manually (see screenrecording linked below)

  8. Only one can be added, the other will results in Error: The annotation already exists image

  9. If you add the relation manually, it will work. image

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

lfoppiano avatar Jul 01 '20 00:07 lfoppiano

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).

reckart avatar Jul 28 '20 08:07 reckart