This page explains what we call annotation in OmegaWiki, from a user point of view.
For the programmer interested in the storage of annotations in the database, plase see Help:Class Attributes table.
What is an annotation?
In OmegaWiki, what we call Annotation is pretty much everything that is not a definition or a translation.
Examples of annotations are example sentences, part of speech, hypernymy relationship, links to Wikipedia, image from Commons. The complete list of annotations available at Omegawiki is explained at Help:List of annotations.
It should be understood that annotations are:
- Of different types;
- Attached at different levels.
Types of annotations
- A relation between two entities in OmegaWiki (such as: two concepts or two words, etc.). For example, "hypernymy" is a relation between two concepts, where concept A is a hypernym of concept B. A relation between two words could be where a word is an alternate spelling of another word (but we don't have this type of annotation yet).
- Plain text
- A simple text, such as example sentence or pronunciation (IPA), that you can copy/paste.
- Translatable text
- A bit like a plain text, but where the text, like definitions, can be literally translated to different languages. For example, it makes sense to have the etymology of a Latin word given, maybe not in Latin, but in English, French, Spanish, etc. In that case, the etymology is actually the same, but written in different languages.
- A link to a URL, such as an image from Commons, or a link to any other external resource.
- Option list
- As opposed to a plain text, where the user can write anything, in an "option list", the user has to choose one element from the list, and cannot enter anything. For example, "part of speech" is an option list, since there is only a limited set of parts of speech that exist. The "subject" of a concept (such as "mathematic", "biology", "religion", etc.) is also an option attribute.
Levels of annotations
- DefinedMeaning (concept) Level - semantic annotations
- For language independent annotations. For example, an image illustrate a concept, and the same image can be used for all translations of different language. In that case, we say that the image is attached at the DefinedMeaning level
- Syntrans Level - lexical annotations
- For annotation that are attached a particular word of a particular language. For example, a pronunciation, an example sentence, or an etymology, are given for a particular word, and are not the same for all translations of a concept.
How to annotate with the interface
The tricky part to adding an annotation is that you first have to know (1) at which level the annotation should be added and (2) what type of annotation it is. In that respect, the page Help:List_of_annotations might be useful. After some times, it gets (almost) intuitive.
-- to update --
This section explains how to add annotations with the interface (with some screenshots hopefully).
To start annotating, you first have to edit the page (DefinedMeaning or expression). Select the part of the data you want to annotate, e.g. an expression in the list of synonyms and translations. Click the "Annotation »" link next to it, and a pop-up window should open.
This pop-up lists the available types of annotation:
- String properties: arbitrary free text values which are monolingual.
- Text properties: multilingual free text values.
- URL properties: links to web addresses that contain a resource of the indicated type.
- Option properties: lists of options. Used for lexical class.
If you want to add an example sentence, you should choose a String property, since the language is implicitly given through the expression. Before you can add an example sentence, you have to select the attribute you want to add from the dropdown list, namely, "example sentence." Write the sentence itself next to it.
If you want to indicate the lexical class of a word, choose Option properties, select the "part of speech" property, and then the lexical class that the expression belongs to for this particular use.
Once you save, the annotation will be stored in the database. Since there can be many different kinds of annotation, all this information is collapsed in the standard OmegaWiki view. If you want to view, for instance, the annotation of an expression, you will have to click the "Annotation »" link next to it, just like you did when editing it.
How does the software know which attributes you can add where? For this, we support class membership. The class membership of a DefinedMeaning directly implies the available attributes. A class is a DefinedMeaning which is part of a specially flagged collection. When a DefinedMeaning is in such a class collection, a list of "Class attributes" can be added to it. These attributes can be restricted to a particular element of the data, e.g., the synonyms and translation, or the definitions. When you now make a DefinedMeaning a member of that class, it automatically inherits these attributes.
Any newly created DefinedMeaning is a member of certain default classes which are defined in the OmegaWiki configuration. The default class lexical item, for example, contains the "example sentence" attribute, which is therefore available for all DefinedMeanings. In the future, it will become possible to explicitly negate class membership, so that selected DefinedMeanings can be changed from the default.