Skip to content

lisestork/SFB-Annotator

Repository files navigation

Semantic Field Book Annotator

DOI Build Published in J. Web Semant.

The Semantic Field Book Annotator is a web application developed for domain experts to harvest structured annotations from field books, drawings and specimen labels of natural history collections. Users can draw bounding boxes over (zoomable) image scans of historical field notes, to which annotations can be attached. All metadata regarding an annotation event, annotation provenance, transcription and semantic interpretation of the text are stored in a knowledge base, which is accessible via a SPARQL endpoint and Web API.

Prerequisites

Software used

Vocabularies, ontologies & specs used

Install & deploy

1. Clone this repository.

git clone https://github.com/LINNAE-project/SFB-Annotator.git

2. Install Docker Compose.

pip install docker-compose

3. Start Docker service(s).

Service Port Docker Image Description
sea 8080 linnae/sfb-annotator Semantic Field Book Annotator
melon 8182 linnae/cantaloupe Cantaloupe image server
mirador 8000 linnae/mirador Mirador image viewer
grlc 8088 clariah/grlc Web API (optional)
cd SFB-Annotator
# list available services
docker-compose config --services

# start all services or one-by-one
docker-compose up -d # or append [SERVICE]

4. Configure service(s).

# populate an empty RDF store (repository)
docker-compose exec sea ./init.sh

# configure sea to use a remote image archive (optional)
# default: data-local.json
BASE_DIR=/usr/local/tomcat/webapps/semanticAnnotator/data/
IMG_SRC=remote  # default: local
docker exec -it sea bash -c "cp $BASE_DIR/data-$IMG_SRC.json $BASE_DIR/data.json"

# configure grlc to use local path (optional)
git clone https://github.com/LINNAE-project/queries
docker cp ./queries grlc:/home/grlc/

5. Build Docker image and deploy container locally (development)

docker build -t linnae/sfb-annotator:local .
docker run --name sea -d -p 8080:8080 linnae/sfb-annotator:local
docker exec sea ./init.sh

# generate RDF triples for example inputs (annotation events)
for json in $(ls data/json/$IMG_SRC/*.json | sort)
do
  prefix="$(basename "$json" .json)"
  suffix=ttl  # or jsonld
  rdf="$prefix.$suffix"
  ./run.sh "$json" "$rdf"
done

Web apps & API endpoints