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

Resize span #283

Closed
amir-zeldes opened this issue Jun 14, 2018 · 7 comments
Closed

Resize span #283

amir-zeldes opened this issue Jun 14, 2018 · 7 comments

Comments

@amir-zeldes
Copy link

It would be great if it were possible to modify the borders of a span annotation without having to delete it. This is especially important if there are edges connecting spans, since modifying the borders would allow us to correct annotations without having to re-do all attached edges.

@amir-zeldes
Copy link
Author

One possible way of doing this is offering "+/-1 token" buttons in the span annotation controls for the left and right border.

@reckart reckart added ⭐️ Enhancement New feature or request 🕶️ UX labels Nov 6, 2018
@reckart reckart added this to the 0.9.0 milestone Mar 12, 2019
@reckart reckart modified the milestones: 0.9.0, 0.10.0 Apr 3, 2019
@reckart reckart modified the milestones: 0.10.0, 0.11.0 Jun 4, 2019
@reckart reckart modified the milestones: 0.11.0, 0.12.0 Jun 24, 2019
@reckart reckart modified the milestones: 0.12.0, Feature backlog Aug 11, 2019
@antonyscerri
Copy link
Contributor

Is there any progress on this feature or similar functionality. Currently it seems your only option is to detele and recreate an existing annotation and all its features to simply change the span. Whether its draggable handles in the UI, controls to move the end points or simply a button which lets you reselect the new span. A similar issue is still open #1632

Would the option of just selecting a new span and moving the features over in the backend once its successfully passed any initial validation be an option.

@reckart
Copy link
Member

reckart commented May 6, 2021

There has been no progress on the issue so far. It is sitting in the backlog so we don't forget it and so that users can comment and indicate interest.

There is a simple case if there is no validation - in that case, we could mostly just add some mechanism to allow for re-selection of spans (not sure about relations).

The complicated case is if validation is turned on (e.g. if stacking is not allowed). In that case, we'd somehow need to avoid the existing span to clash with the validation of the re-located span (or relation). I've been recently thinking about it again and I think it could be easier than though by simply temporarily removing the annotation from the CAS indexes, then trying to create a new annotation at the target location, and if that worked without a validation problem, remove the new annotation again, adjust the position of the unindexed original annotation and then add it back to the indexes. But we'd need to avoid e.g. sending annotation-creation and annotation-deleted events for the annotation that is created temporarily.

@antonyscerri
Copy link
Contributor

Right yes avoiding the current instance of the modified span could pose a problem, like you say if it can be removed or if the validation rules already checked for whether it was the same instance and ignored it that could also work.

Thanks for updating on progress, it would be nice to see such a feature as it would support review flows from pre-generated annotations (and recommender outputs alike) where you need to make minor adjustments particular when there might be other features to copy. In lieu of that some simple ability to otherwise copy all the feature/attributes of another annotations (even if it had to be deleted first before creating the modified one) would be a potential work around.

@amir-zeldes
Copy link
Author

Just seeing this because it looks like I opened this issue a while back :)

This was one of the most desirable features we wanted for entity and coreference annotation - you can see what we ended up implementing here:

https://corpling.uis.georgetown.edu/gitdox/spannotator.html

And indeed if you adjust spans to mal-nest at this URL, the interface will revert to the unedited span (but this is all client-side javascript, so there's no customizable datamodel or server-roundtrip for checking things).

Having this possibility speeds up annotation very noticeably, and especially for correcting NLP output, since it's fairly easy for systems to guess that entities will appear around nouns, but the span often needs to be adjusted. I think it would be a great feature for Inception.

@reckart reckart changed the title Increase/decrease span size of a markable left/right border without deleting it Resize span Dec 28, 2022
reckart added a commit that referenced this issue Dec 28, 2022
- Introduce a new MoveSpanAnnotation action that allows changing the boundaries of a span without deleting/recreating it
@reckart reckart modified the milestones: ⭐️ Feature backlog, 27.0 Dec 28, 2022
@reckart reckart self-assigned this Dec 28, 2022
reckart added a commit that referenced this issue Jan 3, 2023
- Add resizing functionality in brat editor
- Add undo functionality for resizing actions
reckart added a commit that referenced this issue Jan 4, 2023
- Fix drag not ending when mouse is released outside event control scope
- Fix drag starting whenever an annotation is clicked
reckart added a commit that referenced this issue Jan 4, 2023
- Add more classes to SVG elements in brat editor so we know what is what
- Fix exception in selectionToOffsets if nothing was selected (i.e. no ranges)
reckart added a commit that referenced this issue Jan 4, 2023
* main:
  #3610 - Minimizing icon in document level feature is wrong after updating feature
  #3656 - The color of the existing layers changes after adding another layer
  #3679 - NullPointerException during export in WebAnno format
  #283 - Resize span
  #283 - Resize span
  #283 - Resize span
  #3675 - Clean up more brat code
  #3675 - Clean up more brat code
  #3675 - Clean up more brat code
  #3676 - Error when rejecting annotation suggestion
  #3675 - Clean up more brat code
  #1535 - Keyboard shortcuts do not work when focus is in certain editors
  #3571 - Update dependencies
  #3670 - Remove LIF support
  #3670 - Remove LIF support
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-26.3
  #3650 - Link label shows layer name instead of label
reckart added a commit that referenced this issue Jan 4, 2023
* main: (64 commits)
  #3610 - Minimizing icon in document level feature is wrong after updating feature
  #3656 - The color of the existing layers changes after adding another layer
  #3679 - NullPointerException during export in WebAnno format
  #283 - Resize span
  #283 - Resize span
  #283 - Resize span
  #3675 - Clean up more brat code
  #3675 - Clean up more brat code
  #3675 - Clean up more brat code
  #3676 - Error when rejecting annotation suggestion
  #3675 - Clean up more brat code
  #1535 - Keyboard shortcuts do not work when focus is in certain editors
  #3571 - Update dependencies
  #3670 - Remove LIF support
  #3670 - Remove LIF support
  #3668 - Disable tutorial for now
  #3664 - Avoid server-side HTML composition not using Wicket
  #3664 - Avoid server-side HTML composition not using Wicket
  #283 - Resize span
  #3660 - Option to disable span clipping
  ...
@reckart reckart closed this as completed Jan 4, 2023
reckart added a commit that referenced this issue Jan 6, 2023
- Fix resizing to the start of the document
- Properly update the detail panel when the currently selected annotation is resized
reckart added a commit that referenced this issue Jan 9, 2023
- Fix warning in browser console about unsupplied parameter
- Remove logging statement that is no longer needed
@reckart
Copy link
Member

reckart commented Jan 10, 2023

Drag indicator in the brat editor has wrong position in Safari (seems to work in chrome and firefox though).

@reckart reckart reopened this Jan 10, 2023
reckart added a commit that referenced this issue Jan 10, 2023
- Imrprove handling of resizing across different browsers. Chrome works best. Firefox and Safari have nasty quirks that we try to work around.
@reckart reckart closed this as completed Jan 10, 2023
reckart added a commit that referenced this issue Jan 13, 2023
- Fix ability to draw a relation using drag/drop
reckart added a commit that referenced this issue Mar 5, 2023
- Avoid displaying resize handles in brat editor on synthetic annotations
- Fix bug that used the wrong layer adapter to perform the resize operation
reckart added a commit that referenced this issue Mar 5, 2023
* release/27.x:
  #283 - Resize span
@reckart
Copy link
Member

reckart commented Apr 4, 2023

Resizing annotations in recent INCEpTION versions :)

Screen.Recording.2023-04-04.at.16.45.58.mp4

@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
Projects
Archived in project
Development

No branches or pull requests

3 participants