Dependency Annotation¶
Dependency relations are syntactic relations between spans of tokens. A dependency relation takes a particular class and consists of a single head component and a single dependent component.
Specification¶
Annotation Category: | |
---|---|
Declaration: |
|
Version History: | |
Slightly revised since v0.8 (no |
|
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.
Dependency relations are syntactic relations between spans of tokens. A dependency relation takes a particular class and consists of a single head component and a single dependent component. In the sample “He sees”, there is syntactic dependency between the two words: “sees” is the head, and “He” is the dependant, and the relation can be qualified as something like subject, as the dependant is the subject of the head word. Each dependency relation is explicitly noted in FoLiA.
The element <dependencies>
introduces this annotation layer. Within it,
<dependency>
elements describe all dependency pairs.
The <dependency>
element always contains two span roles: one
head element (<hd>
) and one dependent element (<dep>
). Within these span roles, the words
referenced in the usual stand-off fashion, using <wref>
.
Example¶
In the example below, we show a Dutch sentence parsed with the Alpino Parser.
For a better understanding, The following figure illustrates the syntactic parse with the dependency relations (blue).
We show not only the dependency layer, but also the syntax layer (Syntactic Annotation) to which it is related.
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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | <?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> <dependency-annotation set="alpino-dependencies"> <!-- an ad-hoc set --> <annotator processor="p2" /> </dependency-annotation> <syntax-annotation set="alpino-constituents"> <!-- an ad-hoc set --> <annotator processor="p2" /> </syntax-annotation> </annotations> <provenance> <processor xml:id="p1" name="proycon" type="manual" /> <processor xml:id="p2" name="alpino" /> </provenance> </metadata> <text xml:id="example.text"> <p xml:id="example.p.1"> <s xml:id="example.p.1.s.1"> <t>De man begroette hem.</t> <w xml:id="example.p.1.s.1.w.1"><t>De</t></w> <w xml:id="example.p.1.s.1.w.2"><t>man</t></w> <w xml:id="example.p.1.s.1.w.3"><t>begroette</t></w> <w xml:id="example.p.1.s.1.w.4" space="no"><t>hem</t></w> <w xml:id="example.p.1.s.1.w.5"><t>.</t></w> <dependencies> <dependency xml:id="example.p.1.s.1.dependency.1" class="su"> <hd> <wref id="example.p.1.s.1.w.3" t="begroette"/> </hd> <dep> <wref id="example.p.1.s.1.w.2" t="man" /> </dep> </dependency> <dependency xml:id="example.p.1.s.1.dependency.3" class="obj1"> <hd> <wref id="example.p.1.s.1.w.3" t="begroette"/> </hd> <dep> <wref id="example.p.1.s.1.w.4" t="hem" /> </dep> </dependency> <dependency xml:id="example.p.1.s.1.dependency.2" class="det"> <hd> <wref id="example.p.1.s.1.w.2" t="man" /> </hd> <dep> <wref id="example.p.1.s.1.w.1" t="De" /> </dep> </dependency> </dependencies> <syntax> <su xml:id="example.p.1.s.1.su.1" class="top"> <su xml:id="example.p.1.s.1.su.1_1" class="smain"> <su xml:id="example.p.1.s.1.su.1_1_1" class="np"> <su xml:id="example.p.1.s.1.su.1_1_1_1" class="top"> <wref id="example.p.1.s.1.w.1" t="De" /> </su> <su xml:id="example.p.1.s.1.su.1_1_1_2" class="top"> <wref id="example.p.1.s.1.w.2" t="man" /> </su> </su> <su xml:id="example.p.1.s.1.su.1_1_2" class="verb"> <wref id="example.p.1.s.1.w.3" t="begroette" /> </su> <su xml:id="example.p.1.s.1.su.1_1_3" class="pron"> <wref id="example.p.1.s.1.w.4" t="hem" /> </su> </su> <su xml:id="example.p.1.s.1.su.1_2" class="punct"> <wref id="example.p.1.s.1.w.5" t="." /> </su> </su> </syntax> </s> </p> </text> </FoLiA> |