pelagios / recogito2

Semantic Annotation Without the Pointy Brackets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extended JSON-LD target attributes?

docuracy opened this issue · comments

We'd like to be able to get in a single download the stored attributes of a Linked Box as exposed in the CSV download (e.g. "lbox:rx=3975,ry=3699,px=3912,py=3751,a=-0.38150838078503974,l=371,h=41"), together with all of the other detail already contained in the JSON-LD download. Could it perhaps replace the value in the Fragment Selector, and is there another published standard to which it conforms?

Otherwise we could do what we want by joining the annotation ids from the two downloads, but this seems unnecessarily messy.

Could you tell us, please, where are the annotations stored, the schema used, and where in the directory tree can we find the scala files that pick the database fields and generate the JSON and CSV files?

Thank you - and sorry for so many questions!

The issue is that there's no standard to encode the linked box. (The only standard compliant way would be to convert the linked box' w/h/angle params to a polygon and then express that as an SVG selector. But we never actually implemented that.) If your running your own instance, standard compliance might not be a huge issue though.

All the download serializers are here:
https://github.com/pelagios/recogito2/tree/main/app/controllers/document/downloads/serializers/annotations

The webannotation folder contains the WebAnno JSON-LD serialization.

Thanks again!

On reflection, I think the simplest way to implement what we want is to query the ElasticSearch index directly. To try to determine the indexed document structure I could inspect sets of our Annotations extracted that way, but I wonder if you can point me to documentation for a fully-populated JSON Annotation example, please ?

The ElasticSearch schema for the annotation data type is defined here if that helps?

https://github.com/pelagios/recogito2/blob/main/conf/es-mappings/01_annotation.json

It does. Thanks again.