Open-Source Annotation Toolkit for Inline, Online Web Annotation
November 12, 2010 in Annotator, OKF Projects, Open Shakespeare, Releases
This is a post by Rufus Pollock, a long-time Open Knowledge Foundation member and coordinator of the Open Shakespeare project.
We’ve been working on web-annotation — inline, online annotation of web texts — for several years.
Our original motivation was to support annotation of texts in http://openshakespeare.org/ so we can collaboratively build up critical notes but since then I’ve seen this need again and again — in drafting new open data licenses, with scholars working on medieval canon law, when taking my own notes on academic papers.

Open Shakespeare’s Hamlet in annotate mode
What’s surprised me is that there appears to be no good opensource tool out there to do this. There are several commercial offerings (including annotation in google docs), and there have been opensource attempts such as annotea, Stet (for GPLv3), marginalia, and co-ment but none of these really seemed to work — my original implementation in 2006/2007 of annotation for http://openshakespeare.org/ used http://geof.net/‘s (excellent) marginalia library but I ultimately ran into performance and integration problems).
Thus, a year and a half ago, in collaboration with Nick Stenning, we started developing an annotator project to create a new, simple javascript (+ backend) library for web-annotation. Our main goals were and are:
- Annotation of arbitrary text ranges
- Annotate any web (html) document
- Easy to use — 2 lines of javascript to insert this in your web page/app etc
- Well-factored and library-structured — easy to integrate and easy to extend
Nick’s (who’s a great javascript (and css) developer), has been responsible for writing all of the frontend (i.e. the annotation stuff you actually see!) while I’ve developed the backend annotation store.
In the way of spare-time projects, development has been rather slower than we would have liked but we now have a functioning alpha which has now been running successfully on http://openshakespeare.org/ for the last 6 months.
Furthermore, the system is completely app-agnostic and is incredibly easy to use — adding annotation to your web page only requires one line of jquery javascript (assuming a backend is set up):
$('#your-element-id').annotator()
Interested? Below are links to project information including the source code and docs and mailing list. We’re especially eager to get feedback from those looking to integrate into other apps or who would like to help develop the library features.
Project Info
- Official project home page
- Mailing list
- Email us directly at annotator [at] okfn [dot] org.
Source code
- Javascript library: http://github.com/nickstenning/annotator docs
- Backend: http://github.com/nickstenning/annotator-store-py docs
- SQL + Python backend
- Alpha couchdb backend
Features
- Open JSON-REST annotation protocol – simple JSON and REST-based
- Javascript (jquery-based) library for inserting inline annotations in a given document supporting this protocol
- One or more backends implementing this protocol (emphasis on backends that are easy to deploy using standard tools e.g. using sql database or couchdb)
- Really simple: just do (jquery-esqe) $(‘myelement’).annotator() to get up and running
- Fast even on large documents
- Support of multiple users
- Pluggable backends
Related posts:
- Adding Web-Based Annotation Support We intend to add annotation/commentarysupport to the open shakespeare web demo either in this release or next. As a first step we’ve been looking to see what (open-source) web-based annotation systems are already out there. Below is our list of...
- Annotation is Working! After another push over the last few days I’ve got the web annotation system for Open Shakespeare operational (we’ve been hacking on this on and off since back in December). To see the system in action visit: http://demo.openshakespeare.org/view?name=phoenix_and_the_turtle_gut&format=annotate Quite a...
- Thinking about Annotation Annotation means the adding of comments/notes/etc to an underlying resource. For the present I’ll focus on the situation where the underlying resource is textual (as opposed to being an image, or a piece of film or some data). Various things...
Open Knowledge Foundation Blog
Tim McNamara said on November 14, 2010
This is fantastic Nick & Rufus! Thanks for all of your work over several years.
Iain Emsley said on November 21, 2010
This looks excellent Nick and Rufus. I think it is something that I might try to intregrate into a future version of Open Correspondence.