Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting annotation and entity with arc over different pages #4809

Closed
2 tasks done
s2fische opened this issue May 17, 2024 · 5 comments
Closed
2 tasks done

Connecting annotation and entity with arc over different pages #4809

s2fische opened this issue May 17, 2024 · 5 comments
Assignees
Labels
Milestone

Comments

@s2fische
Copy link

s2fische commented May 17, 2024

Describe the bug
When marking a Bezugsentität (both Wertender/gewertete Entität), if the entity is on a different page than the Wertung itself, the arc that visually connects the two annotations doesn't show up, although the connection has been successfully made, as can be seen in the menu on the right. The same problem appeared with Codierungen and Codierender/codierte Entität.

To Reproduce
Steps to reproduce the behavior:

  1. If a Wertung has been set, annotate a Bezugsentität (Wertender and/or gewertete Entität) outside the span of the Wertung, at least one sentence away. The arc should be visible if they are on the same page.
  2. If necessary, use Preferences to force Wertung and entity to be on different pages of the document (set it to brat sentence-oriented and reduce the amount of sentences on the page).
  3. The error is that the arc, visible before, has now vanished.

Expected behavior
Usually, these arcs should appear so you can see the connection between Wertung and entity at first glance.

Screenshots
Screenshot 2024-05-17 163312
Screenshot 2024-05-17 164230
Screenshot 2024-05-17 164337
Screenshot 2024-05-17 165551
Screenshot 2024-05-17 165619
Screenshot 2024-05-17 165659

Please complete the following information:

  • Version and build ID: 31.3 (2024-03-12 20:11:22, build 6743f93)
  • OS: Windows 11
  • Browser: Firefox

Additional context
Same thing happened to my colleague using Chrome (also Windows).

To do

  • Make it work for relations
  • Make it work for link features
@reckart reckart added 🐛Bug Something isn't working Module: Annotation labels May 17, 2024
@reckart reckart self-assigned this May 17, 2024
@reckart reckart added this to the 32.3 milestone May 17, 2024
@reckart
Copy link
Member

reckart commented May 17, 2024

An arc is currently only visible if both endpoints are visible.

The arc should be visible if they are on the same page.

If the start and end point are on the same page, the arc should be visible. I haven't noticed a case in your screenshots where this is not the case. If it is the case, could you please point out the screenshot with the respective example?

Usually, these arcs should appear so you can see the connection between Wertung and entity at first glance.

You would only be able to see the connection between Wertung and the entity if both Werung and the entity are visible. If one is outside the currently visible viewport - even if an arc would be drawn - you wouldn't be able to see that there is a connection between the two - only that there is some connection.

I agree though that it would be useful if there was some visual representation of a partial arc even if only one of the arc endpoints is visible on screen.

@reckart reckart modified the milestones: 32.3, 33.0 May 17, 2024
@reckart reckart added ⭐️ Enhancement New feature or request and removed 🐛Bug Something isn't working labels May 17, 2024
reckart added a commit that referenced this issue May 17, 2024
- When collecting relations to render, inclode relations that have one of their endpoints overlapping with the current viewport
- If the other endpoint is outside the viewport, create a dummy annotation either at the beginning or end of the viewport and connect the relation to that
@s2fische
Copy link
Author

s2fische commented May 21, 2024

If the start and end point are on the same page, the arc should be visible. I haven't noticed a case in your screenshots where this is not the case. If it is the case, could you please point out the screenshot with the respective example?

This is how it should look (arc visible even over several lines, which is why I included these):
Screenshot 2024-05-17 164230

This is how the same annotation looks when entity ("sie") and Wertung are separated by different pages (arc invisible):
Screenshot 2024-05-17 164337

Screenshot 2024-05-17 163312

@reckart
Copy link
Member

reckart commented May 21, 2024

As I said - currently an arc can only be drawn when both endpoints are visible on the same "page". INCEpTION tells the adapted brat rendering engine that is used here to draw a connection between e.g. the span annotations on sie and on ich werde nun für mein Lebtag frei bleiben. However, if only one of the endpoints spans (e.g. the one on sie) is visible, INCEpTION cannot tell the rendering engine to draw an open-ended relation to beyond the end of the page - the rendering engine does currently not have such a functionality.

After you report, I have looked a bit into this any played around with ideas to start supporting such a functionality. In particular, I have tried to introduce an artificial span at the beginning/end of the page to which I could connect arcs that go beyond the page end. That idea kind of works, but it currently looks very ugly and there are a bunch of open questions regarding the implementation that I haven't resolved yet.

In order to fix the ugly looks, I have to make further adjustments to the rendering engine that INCEpTION adapted from brat, but in areas that I am not too familiar with. So it is a bit tricky.

Right now, I can only suggest that you might try to increase the number of visible lines in the preferences dialog to maybe alleviate the issue a bit. Also, you can open the annotation sidebar on the left which gives an overview over all annotations including the potentially invisible arcs - so at least you have another way of finding them which does not require you having to select one of the endpoints.

reckart added a commit that referenced this issue May 21, 2024
- When collecting relations to render, inclode relations that have one of their endpoints overlapping with the current viewport
- If the other endpoint is outside the viewport, create a dummy annotation either at the beginning or end of the viewport and connect the relation to that
reckart added a commit that referenced this issue May 21, 2024
- When collecting relations to render, inclode relations that have one of their endpoints overlapping with the current viewport
- If the other endpoint is outside the viewport, create a dummy annotation either at the beginning or end of the viewport and connect the relation to that
@s2fische
Copy link
Author

I agree though that it would be useful if there was some visual representation of a partial arc even if only one of the arc endpoints is visible on screen.

That would be really helpful, since increasing the number of lines on one page becomes confusing very quickly, especially in curation mode.

reckart added a commit that referenced this issue May 26, 2024
- When an annotation has an extension ID for which no actual extension exists (i.e. `rel` for the `rel:0-before` placeholder) then do not thrown exception in the lazy detail renderer
- Allow rendering placeholder annotations to VDocument which can be replaced by proper annotations
- Handle off-screen relation endpoints in brat and PDF editor
reckart added a commit that referenced this issue May 26, 2024
- Handle off-screen relation endpoints in recogito editor
- Improve backwards compatibility
reckart added a commit that referenced this issue May 26, 2024
- Handle off-screen relation endpoints in recogito editor
- Improve backwards compatibility
reckart added a commit that referenced this issue May 27, 2024
- Handle off-screen relation endpoints in recogito editor
- Improve backwards compatibility
reckart added a commit that referenced this issue May 28, 2024
…ng-annotation-and-entity-with-arc-over-different-pages

#4809 - Connecting annotation and entity with arc over different pages
@reckart
Copy link
Member

reckart commented May 28, 2024

I have implemented this for relations now. For link features, it does not work yet though.

reckart added a commit that referenced this issue May 30, 2024
reckart added a commit that referenced this issue May 30, 2024
reckart added a commit that referenced this issue May 30, 2024
reckart added a commit that referenced this issue May 30, 2024
- Remove unnecessary function arguments
- Set placeholder flag properly on placeholders
reckart added a commit that referenced this issue May 30, 2024
- Remove unnecessary function arguments
- Set placeholder flag properly on placeholders
reckart added a commit that referenced this issue May 30, 2024
reckart added a commit that referenced this issue May 30, 2024
…ng-annotation-and-entity-with-arc-over-different-pages

#4809 - Connecting annotation and entity with arc over different pages
@reckart reckart closed this as completed May 30, 2024
reckart added a commit that referenced this issue Jun 5, 2024
* main: (47 commits)
  #4854 - Upgrade dependencies
  #1959 - Curation mode does not render cross-sentence relations
  #4846 - Control JUL bridge using a dedicated property
  #4745 - Upgrade dependencies
  #4745 - Upgrade dependencies
  #4835 - Error when trying to open certain documents with stacked annotations for curation
  #4839 - Scrolling to selection does sometimes not work in Apache Annotator Editor
  #4809 - Connecting annotation and entity with arc over different pages
  #4809 - Connecting annotation and entity with arc over different pages
  #4809 - Connecting annotation and entity with arc over different pages
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-33.0-beta-3
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-32.3
  #4832 - Improve self-help for reverse proxies
  #4832 - Improve self-help for reverse proxies
  #4832 - Improve self-help for reverse proxies
  #4830 - Cannot enable logging for JUL-based libraries
  #4809 - Connecting annotation and entity with arc over different pages
  #4809 - Connecting annotation and entity with arc over different pages
  ...

% Conflicts:
%	inception/inception-app-webapp/pom.xml
%	inception/inception-constraints/src/main/java/de/tudarmstadt/ukp/clarin/webanno/constraints/ConstraintsServiceImpl.java
%	inception/inception-recommendation/pom.xml
%	inception/inception-schema/src/main/java/de/tudarmstadt/ukp/inception/schema/service/AnnotationSchemaServiceImpl.java
%	inception/inception-search-core/src/main/java/de/tudarmstadt/ukp/inception/search/SearchServiceImpl.java
%	pom.xml
@reckart reckart added this to Kanban Aug 7, 2024
@reckart reckart moved this to 🍹 Done in Kanban Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

2 participants