-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathParlaMint-TEI.ana.rng
341 lines (321 loc) · 9.41 KB
/
ParlaMint-TEI.ana.rng
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<?xml version="1.0" encoding="UTF-8"?>
<grammar ns="http://www.tei-c.org/ns/1.0"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<a:documentation>RelaxNG XML schema for ParlaMint corpora: schema
for linguistically annotatated corpus component file.</a:documentation>
<a:documentation>The linguistic annotation markup covers sentences, tokens, lemmas,
morphosyntactic tags, UD morphological features, UD dependency relations, and named
entities.</a:documentation>
<include href="ParlaMint-TEI.rng">
<define name="encodingDesc">
<a:documentation>Encoding description linguistically annotated corpus compoment.</a:documentation>
<element name="encodingDesc">
<ref name="global.atts"/>
<element name="projectDesc">
<ref name="paras"/>
</element>
<ref name="tagsDecl"/>
<a:documentation>Definition of listPrefix for MTed corpora.</a:documentation>
<optional>
<element name="listPrefixDef">
<ref name="prefixDef"/>
</element>
</optional>
</element>
</define>
<define name="seg">
<a:documentation>The only element that contains analysed text is the segment. It can,
however, contain transcription commentary.</a:documentation>
<element name="seg">
<ref name="global.atts"/>
<!-- Might have a linguistic analysis -->
<optional>
<ref name="ana.att"/>
</optional>
<oneOrMore>
<choice>
<ref name="comment"/>
<ref name="pb"/>
<ref name="sentence"/>
</choice>
</oneOrMore>
</element>
</define>
</include>
<define name="sentence">
<a:documentation>A sentence.</a:documentation>
<element name="s">
<ref name="global.atts"/>
<!-- Might have a linguistic analysis -->
<optional>
<ref name="ana.att"/>
</optional>
<oneOrMore>
<choice>
<ref name="comment"/>
<ref name="pb"/>
<ref name="ner"/>
<ref name="phr"/>
<ref name="word"/>
<ref name="punct"/>
</choice>
</oneOrMore>
<optional>
<ref name="syntax"/>
</optional>
</element>
</define>
<define name="phr">
<a:documentation>Multi-Word Unit</a:documentation>
<element name="phr">
<ref name="global.atts"/>
<attribute name="function">
<data type="token"/>
</attribute>
<attribute name="ana">
<data type="anyURI"/>
</attribute>
<a:documentation>Currently we only support phrases with semantic markers</a:documentation>
<attribute name="type">
<value>sem</value>
</attribute>
<ref name="mwe_tokens"/>
</element>
</define>
<define name="ner">
<a:documentation>Named entity element</a:documentation>
<choice>
<a:documentation>Standard name element</a:documentation>
<element name="name">
<ref name="global.atts"/>
<ref name="ref.att"/>
<optional>
<attribute name="ana">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type">
<choice>
<value>PER</value>
<value>LOC</value>
<value>ORG</value>
<value>MISC</value>
</choice>
</attribute>
</optional>
<optional>
<attribute name="subtype">
<data type="token"/>
</attribute>
</optional>
<ref name="ner_tokens"/>
</element>
<a:documentation>Additional content used by CZ:</a:documentation>
<element name="date">
<ref name="ner.atts"/>
<optional>
<ref name="temporal.atts"/>
</optional>
<ref name="ner_tokens"/>
</element>
<element name="time">
<ref name="ner.atts"/>
<ref name="ner_tokens"/>
</element>
<element name="num">
<ref name="ner.atts"/>
<ref name="ner_tokens"/>
</element>
<element name="unit">
<ref name="ner.atts"/>
<ref name="ner_tokens"/>
</element>
<element name="email">
<ref name="ner.atts"/>
<ref name="ner_tokens"/>
</element>
<element name="ref">
<ref name="ner.atts"/>
<ref name="ner_tokens"/>
</element>
</choice>
</define>
<define name="ner.atts">
<a:documentation>Attributes for NEs.</a:documentation>
<ref name="global.atts"/>
<attribute name="ana">
<data type="anyURI"/>
</attribute>
</define>
<define name="mwe_tokens">
<a:documentation>Annotations that can appear in a MWE.</a:documentation>
<oneOrMore>
<choice>
<ref name="word"/>
<ref name="punct"/>
</choice>
</oneOrMore>
</define>
<define name="ner_tokens">
<a:documentation>Annotations that can appear in a NE.</a:documentation>
<oneOrMore>
<choice>
<ref name="word"/>
<ref name="punct"/>
<ref name="comment"/>
<ref name="pb"/>
<ref name="ner"/>
</choice>
</oneOrMore>
</define>
<define name="tokens">
<a:documentation>A series of tokens.</a:documentation>
<oneOrMore>
<choice>
<ref name="word"/>
<ref name="punct"/>
</choice>
</oneOrMore>
</define>
<define name="word">
<a:documentation>Definition of word.</a:documentation>
<element name="w">
<a:documentation>cf. https://clarin-eric.github.io/parla-clarin/#sec-ananorm</a:documentation>
<choice>
<a:documentation>Simple word:</a:documentation>
<group>
<ref name="word.atts"/>
<ref name="normalized-space.string"/>
</group>
<a:documentation>Word with several normalised words:</a:documentation>
<group>
<ref name="word-optional.atts"/>
<!-- This doesn't work: error: group of "string" or "data" element -->
<!--ref name="normalized-space.string"/-->
<text/>
<oneOrMore>
<element name="w">
<ref name="word.atts"/>
<empty/>
</element>
</oneOrMore>
</group>
<a:documentation>Normalised word with several surface words:</a:documentation>
<group>
<ref name="word.atts"/>
<oneOrMore>
<element name="w">
<ref name="normalized-space.string"/>
</element>
</oneOrMore>
<empty/>
</group>
</choice>
</element>
</define>
<define name="punct">
<a:documentation>A punctuation element.</a:documentation>
<element name="pc">
<ref name="token.atts"/>
<ref name="non-empty.string"/>
</element>
</define>
<define name="syntax">
<a:documentation>Dependency syntax as a link group (inside a sentence).</a:documentation>
<element name="linkGrp">
<attribute name="targFunc">
<value>head argument</value>
</attribute>
<attribute name="type">
<value>UD-SYN</value>
</attribute>
<oneOrMore>
<element name="link">
<attribute name="ana">
<data type="anyURI"/>
</attribute>
<attribute name="target">
<ref name="anyURIs"/>
</attribute>
<empty/>
</element>
</oneOrMore>
</element>
</define>
<define name="token.atts">
<a:documentation>Attributes of token elements.</a:documentation>
<optional>
<ref name="id.att"/>
</optional>
<ref name="lang.att"/>
<optional>
<attribute name="join">
<value>right</value>
</attribute>
</optional>
<optional>
<attribute name="norm">
<ref name="non-empty.string"/>
</attribute>
</optional>
<attribute name="msd">
<ref name="non-empty.string"/>
</attribute>
<optional>
<attribute name="ana">
<ref name="anyURIs"/>
</attribute>
</optional>
<optional>
<attribute name="pos">
<ref name="non-empty.string"/>
</attribute>
</optional>
<optional>
<attribute name="function">
<!-- This is different from TEI, where it is a name token (which can't contain comma!?) -->
<!--ref name="normalized-space.string"/-->
<data type="token"/>
</attribute>
</optional>
</define>
<define name="word.atts">
<a:documentation>Obligatory attributes of word.</a:documentation>
<ref name="token.atts"/>
<attribute name="lemma">
<ref name="normalized-space.string"/>
</attribute>
</define>
<define name="word-optional.atts">
<a:documentation>Optional attributes of word.</a:documentation>
<optional>
<ref name="id.att"/>
</optional>
<ref name="lang.att"/>
<optional>
<attribute name="join">
<value>right</value>
</attribute>
</optional>
<optional>
<a:documentation>UD PoS and morph.features, e.g. "UPosTag=NUM|NumForm=Digit":</a:documentation>
<attribute name="msd">
<ref name="non-empty.string"/>
</attribute>
</optional>
<optional>
<attribute name="ana">
<ref name="anyURIs"/>
</attribute>
</optional>
<optional>
<attribute name="lemma">
<ref name="normalized-space.string"/>
</attribute>
</optional>
</define>
</grammar>