3

I have a set of files <*.txt, *.ann> in brat format.
Example: file.txt

Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Morbi varius sapien ut vestibulum ornare. 
Donec volutpat ipsum dolor, eu feugiat ligula hendrerit vel.

Example: file.ann

T1  TagName1 7 11   ipsum
T2  TagName2 19 21  sit
T3  TagName3 23 26  amet
R1  belongs Arg1:T1 Arg2:T2
R2  provides Arg1:T3 Arg2:T1

Is there any Ruby gem or parser or library that can produce a highlighted visualization in simple html format of text based on .ann file? Is there someone who has worked with brat file format?

FlyingFoX
  • 3,379
  • 3
  • 32
  • 49
kitz
  • 879
  • 2
  • 9
  • 24
  • Brat seems to be able to export the data to SVG or PDF. Maybe that's already enough for you. – FlyingFoX Jan 17 '17 at 12:39
  • You can use brat's "embedded" setup to let brat render an SVG element for you (which can be done inside a HTML that you are displaying). However, brat rendering is only done clientside, and the algorithm is rather convoluted; I would be very surprised if someone went to the trouble of reproducing it in a serverside gem (which ups the difficulty significantly, given that brat uses the browser's measurements in order to perform its layout). – Amadan Feb 06 '17 at 07:04

0 Answers0