dkpro / dkpro-core

Collection of software components for natural language processing (NLP) based on the Apache UIMA framework.
https://dkpro.github.io/dkpro-core
Other
195 stars 67 forks source link

brat JSON embedded format #1450

Open TheFrisbeeHamster opened 4 years ago

TheFrisbeeHamster commented 4 years ago

For the normal brat visualizer there is the BratWriter component in DKPro which exports .ann, annotation.conf, tools.conf and visual.conf files I was wondering if there is the possibility to let DKPro write out annotations to the brat JSON format (explained here: Link). Or is there an existing tool that does this? The JsonWriter outputs a different JSON format than required by the embedded version of brat.

reckart commented 4 years ago

You can set PARAM_FILENAME_EXTENSION to .html or .json to have the writer either generate a static HTML page visualizing the annotations or just the plain JSON.

reckart commented 4 years ago

It would probably be a good idea to either properly document this or to split the writer up into multiple components: BratAnnWriter, BratHtmlWriter and BratJsonWriter.