Documentation for teian

Claudius Teodorescu

XML Consultant

2011-09-20

Abstract

teian is a standalone, web-based annotator for texts in XML format. It works by directly annotating the respective XML file or fragment. The end user does not have to know the XML markup, but just choose the text to annotate, and select an annotator.

teian can be easily extended in order to use new XML annotators


Table of Contents

Scope
Description
Localization
Installation
Prerequisites
Installation of the annotator
Usage
Description of annotators
Generalities
Types of annotators
Description of annotator types
Unit tests
[Note] Note

These dependencies have to be installed in the same folder as teian. They are archived by default in the teian package.

Each XML element to be used for annotation has to be defined as follows:

  • The annotators are defined in $TEIAN_HOME/config/annotator-specifications.xml file.

  • The localization is defined in $TEIAN_HOME/config/lang/en.xml , or other file, according to choosen language - for examples of usage, see below.

  • One has to provide for each annotator an unique id (@id), a name (@name), which is the corresponding XML element name, and a type code (@type-code), which is the type of the respective annotator.

  • In order to provide an annotated XML document that is conformant to its schema, one has to provide for each annotator the name of the parent and preceding sibling XML elements (annotator-possible-parent-element-names and annotator-possible-preceding-sibling-element-names).

  • Also, for each annotator has to be provided the description of each attribute of the respective XML element (if any), according to examples, and the name for annotator's icon (this is the icon that will appear on toolbar; the respective file should be located into $TEIAN_HOME/config/images folder).

  • In case when the annotator has as UI a dialog panel, the respective panel and its tabs has to be defined according to the examples below.

    Principially speaking, this web-annotator allows user, by means of an panel (for certain annotators), to attach desired strings to the respective XML element's attributes. For this, each panel has text fields and/or lists, having their values as result of a query to a server or not; each text field/list is thus attached to an XML element's attribute and its content can be validated against a regular expression contained by annotator-panel-field-validation-regex element.

    The labels for each text fiels/list are defined in the respective language file.

    Note that the annotators of "selected-wrap-server" type have a common panel definition, which is entered separately into annotator-specifications.xml file.

  • The annotators' localization definitions have to closely follow the annotator definition, namely to have the same id (@id). Also, one has to define the text that will appear when user hovers over the annotator's button (toolbar-button-title).