-
Notifications
You must be signed in to change notification settings - Fork 1
/
dix.rnc
98 lines (89 loc) · 2.68 KB
/
dix.rnc
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
# DTD for the format of dictionaries
dictionary =
element dictionary {
attlist.dictionary, alphabet?, sdefs?, pardefs?, section+
}
attlist.dictionary &= empty
# root element
alphabet = element alphabet { attlist.alphabet, text }
attlist.alphabet &= empty
# alphabetic character list
sdefs = element sdefs { attlist.sdefs, sdef+ }
attlist.sdefs &= empty
# symbol definition section
sdef = element sdef { attlist.sdef, empty }
# symbol definition
attlist.sdef &= attribute n { xsd:ID }
# n: symbol (tag) name
attlist.sdef &= attribute c { text }?
# c: symbol (tag) comment
pardefs = element pardefs { attlist.pardefs, pardef+ }
attlist.pardefs &= empty
# paradigm definition section
pardef = element pardef { attlist.pardef, e+ }
# paradigm definition
attlist.pardef &= attribute n { text }
# n: paradigm name
section = element section { attlist.section, e+ }
# dictionary section
attlist.section &=
attribute id { xsd:ID },
attribute type { "standard" | "inconditional" | "postblank" }
# id: dictionary section identifier
# type: dictionary section type
e = element e { attlist.e, (i | p | par | re)+ }
# entry
attlist.e &=
attribute r { "LR" | "RL" }?,
attribute lm { text }?,
attribute a { text }?,
attribute c { text }?,
attribute i { text }?,
attribute slr { text }?,
attribute srl { text }?
# r: restriction LR: left-to-right,
# RL: right-to-left
# lm: lemma
# a: author
# c: comment
# i: ignore ('yes') means ignore, otherwise it is not ignored)
# slr: translation sense when translating from left to right
# srl: translation sense when translating from right to left
par = element par { attlist.par, empty }
# reference to paradigm
attlist.par &= attribute n { text }
# n: paradigm name
i = element i { attlist.i, (text | b | s | g | j | a)* }
attlist.i &= empty
# identity
re = element re { attlist.re, text }
attlist.re &= empty
# regular expression identification
p = element p { attlist.p, l, r }
attlist.p &= empty
# pair of strings
l = element l { attlist.l, (text | a | b | g | j | s)* }
attlist.l &= empty
# left part of p
r = element r { attlist.r, (text | a | b | g | j | s)* }
attlist.r &= empty
# right part of p
a = element a { attlist.a, empty }
attlist.a &= empty
# post-generator wake-up mark
b = element b { attlist.b, empty }
attlist.b &= empty
# blank chars block mark
g = element g { attlist.g, (text | a | b | j | s)* }
# mark special groups in lemmas
attlist.g &= attribute i { text }?
# i is used to co-index groups in the left with those
# on the right of a pair
j = element j { attlist.j, empty }
attlist.j &= empty
# join lexical forms
s = element s { attlist.s, empty }
# reference to symbol (tag)
attlist.s &= attribute n { xsd:IDREF }
start = dictionary
# n: symbol (tag) name