Extension:Semantic Text Annotator

Semantic Text Annotator is an extension for Semantic MediaWiki developed within the research project Abitur- Abiturprüfungspraxis und Abituraufsatz 1882-1972 that allows you to add, edit and observe semantic text annotations in your wiki. It requires Semantic MediaWiki and Page Forms. The extension is based on the JavaScript library annotator.js.

Link PageForms to Annotations
Semantic Text Annotator has a special page which allows to Link existing Page Forms to Annotation Categories. Thus, users are very flexible to include various Annotations Forms. The Special Page is currently structured under the section Other Special Pages



On the Special Page, users can add and delete linked Forms to Annotation Categories, as well as colours. The currently supported colours are red, green, yellow, blue and grey.

After linking special Pages to the categories, one can use them to annotate texts.

Create Annotation
On a Main namespace wiki page (Namespace: 0) appears on the navigation bar an additional icon, called Annotate. By clicking on this button starts the Annotation Mode.

The Semantic Text Annotator Extension loads all dependencies and displays a sidebar, which lists all annotations for this wiki page. Existing annotations are also highlighted in the text.

To create an Annotation, mark any text phrase with the mouse. Afterwards, a button is displayed that allows to create a new Annotation for the marked area.

Afterwards, a small window appears that allows to add a comment (optional) on this marked area, as well as selecting an annotation category. The categories were created and linked to Page Forms on the Special Page before.

A Popup appears that allows to enter more meta-information about the marked text via Page Forms. The Page Form that appears is the corresponding one that was selected.

After saving the PageForm, a new Wiki Page with the corresponding content is stored, as well as the phrase is marked as annotated.

The Sidebar on the right can be viewed in by clicking on it. The Sidebar contains all Annotations on the wiki page.

A search function allows to filter for specific Annotations. The search function filters on comments, marked Text phrases and the user, which created/edited the Annotation.

Edit and Delete Annotation
To edit or delete an annotation, simple move with the mouse over the annotation which should be deleted and click on the corresponding button on the top right of the mouseover-window.

Query Annotations
For every wiki page that was annotated via the Semantic Text Annotator, an additional page within the Namespace Annotation is created. This page lists all annotations for the corresponding wiki page. Users can jump on the specific annotation page, which contains all entered information by the user (Comment, Information from Page Forms), as well as some additional information (Modification Date, Modification Users, etc.)

The corresponding Query Syntax is depicted in the following.

The wiki page for each annotation displays all information entered by the user via Page Forms, as well as information from the annotator.js.

Repair Mode
When a text was annotated and the content of this annotated text is changed, then the annotation does not fit to the annotated part anymore. Therefore, while starting and loading existing annotations, the Semantic Text Annotator checks for changes made in the text. If it finds annotations that do not fit to the annotated part, then the Repair Mode starts. The Repair Mode allows to repair such annotations. The Semantic Text Annotator suggests to start the Repair Mode once it detects failures.

The Repair Mode can be started by clicking on the Button Repair Annotations. This Button only appears when annotations are broken and detected by the Semantic Text Annotator.

The Repair Mode guides the user through every broken annotation and displays information about the annotations. User can select the annotations in the text and therefore fix the broken annotations. After all Annotations are done, the Repair Mode ends.

The Semantic Text Annotator returns to the usual Look and displays the fixed Annotations.

Known issues

 * Sidebar does not scroll. Therefore not all Annotations are shown
 * Sidebar icons (Delete, Edit) does not work
 * Buttons My Annotations and Shared do not work.

Acknowledgements
The idea of the Semantic Text Annotator is based on a previous extension Download" by Oliver Lutzi. For the Semantic Text Annotator is the JS Library annotator.js used. This Extension was created for the Semantic MediaWiki Seminar of the AIFB in WS17/18.