-
Notifications
You must be signed in to change notification settings - Fork 509
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
Made UI display spaces between fragments #1176
base: master
Are you sure you want to change the base?
Conversation
For curiosity: why should there be a space between fragments? |
Because fragments are often words or groups of words. Under the current system, two fragments "Some text" and "more text" would end up displayed as "Some textmore text", which looks really odd. You could also have fragments within words, of course, but if they're discontinuous, then it's still reasonable to have a space between them, and if they're continuous, I'm not really sure why you'd make them fragments. FWIW, this also makes the displayed consistent with how the span text is being stored in the .ann file. |
My feeling is that a space should only be added if the end offset of the first fragment is not equal to the begin offset of the second fragment. And then I would see two cases:
The |
As far as I know, Your alternative strategy for splitting fragments makes sense, although I can still see an argument that the UI should emphasize the split between fragments when there is one, even within the same word. Do you have any sense for how often case 1 actually occurs in annotations? Unfortunately, I likely won't get to implement additional changes in the near future, since the subcases are less useful for the project I'm currently working on. |
I do not know how often the different cases appear. |
Hovertext and "text" box in the annotation UI now show spaces between fragments, rather than directly concatenating them.
Also a bit of whitespace cleanup and a typo fix, while I was at it.