Skip to content

Latest commit

 

History

History
69 lines (53 loc) · 5.85 KB

semrole_annotation.rst

File metadata and controls

69 lines (53 loc) · 5.85 KB

Semantic Role Annotation

This span annotation type allows for the expression of semantic roles, or thematic roles. It is often used together with Predicate Annotation

Specification

Annotation Category:

:ref:`span_annotation_category`

Declaration:

<semrole-annotation set="..."> (note: set is mandatory)

Version History:

since v0.9, revised since v1.3 (added predicates)

Element:

<semrole>

API Class:

SemanticRole (FoLiApy API Reference)

Layer Element:

<semroles>

Span Role Elements:

<hd> (Headspan)

Required Attributes:
  • set -- The set of the element, ideally a URI linking to a set definition (see :ref:`set_definitions`) or otherwise a uniquely identifying string. The set must be referred to also in the :ref:`annotation_declarations` for this annotation type.
  • class -- The class of the annotation, i.e. the annotation tag in the vocabulary defined by set.
Optional Attributes:
  • xml:id -- The ID of the element; this has to be a unique in the entire document or collection of documents (corpus). All identifiers in FoLiA are of the XML NCName datatype, which roughly means it is a unique string that has to start with a letter (not a number or symbol), may contain numbers, but may never contain colons or spaces. FoLiA does not define any naming convention for IDs.
  • set -- The set of the element, ideally a URI linking to a set definition (see :ref:`set_definitions`) or otherwise a uniquely identifying string. The set must be referred to also in the :ref:`annotation_declarations` for this annotation type.
  • class -- The class of the annotation, i.e. the annotation tag in the vocabulary defined by set.
  • processor -- This refers to the ID of a processor in the :ref:`provenance_data`. The processor in turn defines exactly who or what was the annotator of the annotation.
  • annotator -- This is an older alternative to the processor attribute, without support for full provenance. The annotator attribute simply refers to the name o ID of the system or human annotator that made the annotation.
  • annotatortype -- This is an older alternative to the processor attribute, without support for full provenance. It is used together with annotator and specific the type of the annotator, either manual for human annotators or auto for automated systems.
  • confidence -- A floating point value between zero and one; expresses the confidence the annotator places in his annotation.
  • datetime -- The date and time when this annotation was recorded, the format is YYYY-MM-DDThh:mm:ss (note the literal T in the middle to separate date from time), as per the XSD Datetime data type.
  • n -- A number in a sequence, corresponding to a number in the original document, for example chapter numbers, section numbers, list item numbers. This this not have to be an actual number but other sequence identifiers are also possible (think alphanumeric characters or roman numerals).
  • textclass -- Refers to the text class this annotation is based on. This is an advanced attribute, if not specified, it defaults to current. See :ref:`textclass_attribute`.
  • src -- Points to a file or full URL of a sound or video file. This attribute is inheritable.
  • begintime -- A timestamp in HH:MM:SS.MMM format, indicating the begin time of the speech. If a sound clip is specified (src); the timestamp refers to a location in the soundclip.
  • endtime -- A timestamp in HH:MM:SS.MMM format, indicating the end time of the speech. If a sound clip is specified (src); the timestamp refers to a location in the soundclip.
  • speaker -- A string identifying the speaker. This attribute is inheritable. Multiple speakers are not allowed, simply do not specify a speaker on a certain level if you are unable to link the speech to a specific (single) speaker.
Accepted Data:

<comment> (:ref:`comment_annotation`), <desc> (:ref:`description_annotation`), <metric> (:ref:`metric_annotation`), <relation> (:ref:`relation_annotation`)

Valid Context:

<predicate> (:ref:`predicate_annotation`), <semroles> (:ref:`semrole_annotation`)

Explanation

Note

Please first ensure you are familiar with the general principles of :ref:`span_annotation_category` to make sense of this annotation type.

Semantic roles are usually embedded within the <predicate> span annotation element (see :ref:`predicate_annotation`, since FoLiA v1.3). This is a separate span annotation element, which itself may also take a class and has its own declaration. Such a class can for instance be used to describe frame semantics, such as FrameNet.

Semantic roles without predicates are also allowed, but less expressive as relations between the semantic roles are not explicit. The reverse also hold, you can do predicate annotation without semantic role labelling.

.. seealso::

    :ref:`predicate_annotation`

Example

.. literalinclude:: ../../examples/semroles.2.0.0.folia.xml
    :linenos:
    :language: xml