webanno
webanno copied to clipboard
Export / Import Annotations to / from Brat Format
Is there currently a way to export annotations in to the standard Brat-file format as described here http://brat.nlplab.org/standoff.html?
This would be a nice feature. Same for import documents from Brat-format.
Greetings, Hendrik
The import/export for brat is not entirely trivial. But you can try doing a conversion outside of WebAnno. When you do that, you will notice why it is not trivial. But that said, it may still work for you.
- Export the files as XMI
- Build a DKPro Core pipeline that reads the XMIs and uses the BratWriter to export to brat format
If you want, I can send you an example of a brat->XMI pipeline I had set up for one user who wanted to import brat into WebAnno.
Presently, I don't have a ready XMI->brat example - but it should be easy to do because the BratWriter in DKPro Core is quite good at auto-detecting the type system and exporting it.
Thanks for fast response,
I think I'll try to do it on my own first. If it does not work I will ask you for an example pipeline.
Thanks
Is there any update on this. I currently have some files annotated in Brat I would like to import to WebAnno to do an inter-agreement check, and then continue tagging on WebAnno. I could manually re-tag inside WebAnno since it's not that much annotated yet, but it would be very nice to be able to automatically import the .ann files.
The schema specification in brat is very different from the one in WebAnno. It can often be mapped, but this is a task that needs to be done manually. As it happens, I was just looking into such a case anyway.
Here is a gist for the moment. I hope to refine this and eventually add it to some proper documentation.
https://gist.github.com/reckart/306b8ffddd30bee1f3afd0468a9ad31d
Standoff is a nice format! π
- https://github.com/inception-project/inception/issues/4498
- https://github.com/inception-project/inception/issues/2424