Metric Annotation¶
Metric Annotation is a form of higher-order annotation that allows annotation of some kind of measurement. The type of measurement is defined by the class, which in turn is defined by the set as always. The metric element has a value
attribute that stores the actual measurement, the value is often numeric but this needs not be the case.
Specification¶
Annotation Category: | |
---|---|
Declaration: |
|
Version History: | |
since v0.9 |
|
Element: |
|
API Class: |
|
Required Attributes: | |
Optional Attributes: | |
|
|
Accepted Data: |
|
Valid Context: |
|
Feature subsets (extra attributes): | |
|
Explanation¶
The <metric>
element allows annotation of some kind of measurement. The type of
measurement is defined by the class, which in turn is user-defined by the set as
always. The metric element has a value
attribute
that stores the actual measurement, the value is often numeric but this needs
not be the case. It is a higher-level annotation element
that may be used with any kind of annotation.
An example of measurements associated with a word/token:
<w xml:id="example.p.1.s.1.w.2">
<t>boot</t>
<metric class="charlength" value="4" />
<metric class="frequency" value="0.00232" />
</w>
The next example shows measurements associated with a span annotation element, in this case to add geolocation information:
<entity class="location">
<wref id="w3" t="New" />
<wref id="w4" t="York" />
<metric class="latitude" value="40.71274" />
<metric class="longitude" value="-74.005974" />
</entity>
The next example demonstrates a full FoLiA document with metric annotation on a Figure, but it may be more appropriate to use Submetadata for this instead:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | <?xml version="1.0" encoding="utf-8"?> <FoLiA xmlns="http://ilk.uvt.nl/folia" version="2.0" xml:id="example"> <metadata> <annotations> <text-annotation> <annotator processor="p1" /> </text-annotation> <division-annotation set="https://raw.githubusercontent.com/LanguageMachines/uctodata/master/setdefinitions/divisions.foliaset.xml"> <annotator processor="p1" /> </division-annotation> <head-annotation> <annotator processor="p1" /> </head-annotation> <figure-annotation> <annotator processor="p1" /> </figure-annotation> <metric-annotation set="adhoc-figure"> <annotator processor="p1" /> </metric-annotation> </annotations> <provenance> <processor xml:id="p1" name="proycon" type="manual" /> </provenance> </metadata> <text xml:id="example.text"> <div xml:id="example.div.1" class="chapter" n="1"> <head> <t>Frits Philips</t> </head> <figure xml:id="example.figure.1" n="1" src="https://upload.wikimedia.org/wikipedia/commons/f/f8/Standbeeld_Frits_Philips.jpg"> <metric class="photographer" value="Robert de Greef" /> <metric class="city" value="Eindhoven" /> <metric class="depicted" value="Frits Philips" /> <metric class="license" value="CC-BY-SA 3.0" /> <caption><t>Standbeeld van Frits Philips in Eindhoven</t></caption> </figure> </div> </text> </FoLiA> |