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 to add, edit and query text annotations in your wiki. It requires Semantic MediaWiki and Page Forms. The extension is based on the JavaScript library annotator.js.

Usage
In the following is the usage and functionality of Semantic Text Annotator described. It starts with establishing annotation Categories, creating new annotations, edit and delete annotations and repair annotations via a repair mode.

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 in providing meta-information about an annotation, based on a Page Form. The Special Page is currently structured under the section Annotations



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. The linked Page Forms to the Annotation Category defines the called Page Form for entering meta-information about the text annotation.

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, the Annotation Mode starts.

The Semantic Text Annotator Extension loads all dependencies and displays a sidebar, which lists all annotations for this wiki page which were entered before. Existing annotations are 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) for this marked area, as well as selecting an annotation category. The categories were created and linked to the corresponding Page Forms on the Special Page (see above).

After clicking on create, a Popup is shown 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 on the small window or rather linked on the special page.

After saving the Page Form, a new wiki page with the corresponding content is stored, which can be queried. The phrase is marked as annotated.

The Sidebar on the right can be displayed 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, simply move with the mouse over the annotation which should be edited or 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 (Namespace 248). 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 the wiki page changed, then it might be the case that 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 a suggestion is shown to the user that the Repair Mode should be used in order to fix the annotations. The Repair Mode allows to repair broken 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. Users 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

 * 'Annotations Button' does also appear on action pages (View History, Edit, etc.)
 * 'Semantic Text Annotator does also appear on special and action pages (which may create invalid context)
 * 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.

Future Work

 * Include Reinstall Button

Log History

 * Update on 01.06.2016: Bug fixes. Solved problems with integration of Semantic Image Annotator. We recommend to install it frees which means to delete the following Pages: Form:TextAnnotation, Template:TextAnnotation as well as edit forms that were connected to the older version. So you have a fresh version.

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.