Syntactic Annotation¶
Assign grammatical categories to spans of words. Syntactic units are nestable and allow representation of complete syntax trees that are usually the result of consistuency parsing.
Specification¶
| Annotation Category: | |
|---|---|
| Declaration: |
|
| Version History: | |
Since the beginning |
|
| Element: |
|
| API Class: |
|
| Layer Element: |
|
| Span Role Elements: | |
| Required Attributes: | |
| Optional Attributes: | |
|
|
| Accepted Data: |
|
| Valid Context: |
|
Explanation¶
Note
Please first ensure you are familiar with the general principles of Span Annotation to make sense of this annotation type.
Syntax annotation allows representation of a syntax tree, commonly the result of constituency parsing. This is a
nested form of span annotation, in which nodes in the tree are represented by <su> (syntactic unit) elements. Each
syntactic unit may carry a class in a user-defined set, determining the vocabulary of the syntax annotation.
It is recommended for each syntactic unit to have a unique identifier.
See also
For dependency parsing, see Dependency Annotation instead.
Example¶
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | <?xml version="1.0" encoding="utf-8"?> <FoLiA xmlns="http://ilk.uvt.nl/folia" version="2.0" xml:id="example"> <metadata> <annotations> <token-annotation set="https://raw.githubusercontent.com/LanguageMachines/uctodata/master/setdefinitions/tokconfig-eng.foliaset.ttl"> <annotator processor="p1" /> </token-annotation> <text-annotation> <annotator processor="p1" /> </text-annotation> <sentence-annotation> <annotator processor="p1" /> </sentence-annotation> <paragraph-annotation> <annotator processor="p1" /> </paragraph-annotation> <syntax-annotation set="syntax"> <!-- an ad-hoc set --> <annotator processor="p1" /> </syntax-annotation> </annotations> <provenance> <processor xml:id="p1" name="proycon" type="manual" /> </provenance> </metadata> <text xml:id="example.text"> <p xml:id="example.p.1"> <s xml:id="example.p.1.s.1"> <t>The Dalai Lama greeted him.</t> <w xml:id="example.p.1.s.1.w.1"><t>The</t></w> <w xml:id="example.p.1.s.1.w.2"><t>Dalai</t></w> <w xml:id="example.p.1.s.1.w.3"><t>Lama</t></w> <w xml:id="example.p.1.s.1.w.4"><t>greeted</t></w> <w xml:id="example.p.1.s.1.w.5" space="no"><t>him</t></w> <w xml:id="example.p.1.s.1.w.6"><t>.</t></w> <syntax> <su xml:id="example.p.1.s.1.su.1" class="s"> <su xml:id="example.p.1.s.1.su.1_1" class="np"> <su xml:id="example.p.1.s.1.su.1_1_1" class="det"> <wref id="example.p.1.s.1.w.1" t="The" /> </su> <su xml:id="example.p.1.s.1.su.1_1_2" class="pn"> <wref id="example.p.1.s.1.w.2" t="Dalai" /> <wref id="example.p.1.s.1.w.3" t="Lama" /> </su> </su> <su xml:id="example.p.1.s.1.su.1_2" class="vp"> <su xml:id="example.p.1.s.1.su.1_2_1" class="v"> <wref id="example.p.1.s.1.w.4" t="greeted" /> </su> <su xml:id="example.p.1.s.1.su.1_2_2" class="pron"> <wref id="example.p.1.s.1.w.5" t="him" /> </su> </su> </su> </syntax> </s> </p> </text> </FoLiA> |