Skip to content

Conversation

@duncanka
Copy link
Contributor

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.

@reckart
Copy link

reckart commented May 24, 2016

For curiosity: why should there be a space between fragments?

@duncanka
Copy link
Contributor Author

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.

@reckart
Copy link

reckart commented May 24, 2016

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:

  1. there is only whitespace between the fragments -> adding a single whitespace may make sense
  2. they are discontinuous -> maybe adding an ellipsis ... may make sense

The span.text that you change is only used in the informative popup, right? I wanted to integrate your change into WebAnno, but then I wasn't entirely sure whether it might break e.g. text selection (I didn't try it).

@duncanka
Copy link
Contributor Author

As far as I know, span.text is used only in the mouseover text and the "text" field you get when you create or edit an annotation.

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.

@reckart
Copy link

reckart commented May 25, 2016

I do not know how often the different cases appear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants