nlplab / brat

brat rapid annotation tool (brat) - for all your textual annotation needs
http://brat.nlplab.org
Other
1.81k stars 509 forks source link

Inconsistent line numbering #1148

Open reckart opened 9 years ago

reckart commented 9 years ago

The line numbering in brat seems somewhat inconsistent. Consider the following cases (tested in the live embedding demo):

Single line

A single line obviously renders ok.

"text": "Ed O'Kelley was the man who shot the man who shot Jesse James. And another sentence.",

2015-07-26_21-23-31

Multiple lines

If we have line breaks outside span annotations, all is ok as well. Yet, I somehow feel that the second line should also carry a number. It looks like a glitch not to have one.

"text": "Ed O'Kelley was the man who shot the man who shot Jesse James.\n\nAnd another sentence.",

2015-07-26_21-25-04

Linebreaks within span

If we have line breaks inside a span, then the number in brat no longer corresponds to the actual line numbering in the document.

"text": "Ed O'Kelley was the man who shot the man who shot Jesse\n\nJames.And another sentence.",

Expected - I would expect that the line breaks are only delayed and not completely consumed. So I would expect something like this:

2015-07-26_21-32-42

Actual - However, what brat renders is this:

2015-07-26_21-26-45

The optimal solution here would be to split the "Jesse James" into two fragments, but the visualization does not support this (yet) - see #1101. I opened this issue for the numbering because it might be solvable without fixing #1101.

reckart commented 9 years ago

Btw. what are the numbers actually meant to indicate: the number of the sentence or of the line?