Modality Annotation¶
Modality annotation is used to describe the relationship between cue word(s) and the scope it covers. It is primarily used for the annotation of negation, but also for the annotation of factuality, certainty and truthfulness:.
Note
This annotation type has overlap with sentiment annotation (_sentiment_annotation). Modality annotation is now preferred over sentiment annotation, as it is more generic.
Specification¶
Annotation Category: | |
---|---|
Declaration: |
|
Version History: | |
Since v2.4.0 |
|
Element: |
|
API Class: |
|
Layer Element: |
|
Span Role Elements: | |
|
|
Required Attributes: | |
Optional Attributes: | |
|
|
Accepted Data: |
|
Valid Context: |
|
Feature subsets (extra attributes): | |
|
Explanation¶
Note
Please first ensure you are familiar with the general principles of Span Annotation to make sense of this annotation type.
Modality analysis marks things such as sentiments, truthfulness, negation, doubt. The <modality>
span annotation element is used to
this end. It is embedded in a <modalities>
layer.
The <modalities>
element takes the following span roles:
<cue>
– (required) – The cue or trigger of the modality. In case of sentiments, this expresses the actual sentiment and could cover word spans such as “happy”, “very satisfied”, “highly dissappointed”. This may also be nested inside<scope>
.<scope>
– (optional) – The scope of the modality. In case of negation for example, this covers the text that is negated.<source>
– (optional) – The source/holder of the modality, assuming it is explicitly expressed in the text. This may also be nested inside<scope>
.<target>
– (optional) – The target/recipient of the modality, assuming it is explicitly expressed in the text. This may also be nested inside<scope>
.
The following feature subsets are predefined (see Features), whether they are actually used depends on the set, their values (classes) are set-dependent as well:
polarity
– Expresses the whether the sentiment is positive, neutral or negative.strength
– Expresses the strength or intensity of the sentiment.
Besides these predefined features, FoLiA’s feature mechanism can be used to associate other custom properties with any sentiment.
Example¶
An example of sentiment analysis:
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 | <?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> <modality-annotation set="sentiments"> <!-- an ad-hoc set --> <annotator processor="p1" /> </modality-annotation> </annotations> <provenance> <processor xml:id="p1" name="proycon" type="manual" /> </provenance> </metadata> <text xml:id="example.text"> <s xml:id="s1"> <w xml:id="s1.w1"><t>He</t></w> <w xml:id="s1.w2"><t>is</t></w> <w xml:id="s1.w3"><t>happy</t></w> <w xml:id="s1.w4"><t>to</t></w> <w xml:id="s1.w5"><t>see</t></w> <w xml:id="s1.w6"><t>him</t></w> <w xml:id="s1.w7"><t>.</t></w> <modalities> <modality class="emotion.joy" polarity="positive" strength="moderate"> <source> <wref id="s1.w1" t="he" /> </source> <target> <wref id="s1.w6" t="him" /> </target> <cue> <wref id="s1.w3" t="happy" /> </cue> </modality> </modalities> </s> </text> </FoLiA> |
An example of negation annotation:
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 | <?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> <modality-annotation set="modalities"> <!-- an ad-hoc set --> <annotator processor="p1" /> </modality-annotation> </annotations> <provenance> <processor xml:id="p1" name="proycon" type="manual" /> </provenance> </metadata> <text xml:id="example.text"> <s xml:id="s1"> <w xml:id="s1.w1"><t>I</t></w> <w xml:id="s1.w2"><t>did</t></w> <w xml:id="s1.w3"><t>not</t></w> <w xml:id="s1.w4"><t>know</t></w> <w xml:id="s1.w5"><t>who</t></w> <w xml:id="s1.w6"><t>you</t></w> <w xml:id="s1.w7"><t>were</t></w> <modalities> <modality class="negation"> <cue> <wref id="s1.w3" t="not" /> </cue> <scope> <wref id="s1.w1" t="I" /> <wref id="s1.w2" t="did" /> <wref id="s1.w4" t="know" /> <wref id="s1.w5" t="who" /> <wref id="s1.w6" t="you" /> <wref id="s1.w7" t="were" /> </scope> </modality> </modalities> </s> </text> </FoLiA> |