forked from papyri/xsugar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtranslation_epidoc.xsg
238 lines (160 loc) · 10.6 KB
/
translation_epidoc.xsg
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
xmlns:xml = "http://www.w3.org/XML/1998/namespace"
NL = [\r\n]+
SP = [ ]
SPO = [ ]+ (MAX)
SPO2 = [ ]*
ANYSP = [\r\n \t]*
BEGTRAN = "<T="
ENDTRAN = "=T>"
BEGP = "<="
ENDP = "=>"
BEGDIV = "<D="
ENDDIV = "=D>"
BEGOPT = "<:"
ENDOPT = ":>"
QUESTION = [\?]?
LINENUM = [0-9]+[/\,a-zA-Z]*[ms0-9]*
TERMLANG = ((la)|(grc\-Latn))
FOREIGNLANG = ((la)|(grc\-Latn))
NOTELANG = ((en)|(de))
//ANYLETTER = [^\/\\\t\^<>_#@~〚〛$\*\&\:\|\{\}\?\"¯≡+\u0323]
ANYLETTER = [^\^<>_#@~〚〛$\*\&\|\{\}\"¯≡+\u0323]
// WORD breaks at space and does not allow DOT
WORD = ([^ \/\\\n\r\t\^<>_#@~〚〛$\*\&\,\.\=\|\'\(\)\{\}\?\"¯≡+\u0323]+) (MAX)
// WORDDIV breaks at space and does not allow DOT - allows +, \,
WORDDIV = ([^ \n\r\t\^<>_#@~〚〛$\*\&\.\=\|\'\(\)\{\}\?\"¯≡\u0323]+) (MAX)
// WORDS allows space (therefore multiple words) and DOT
WORDS = ([^\/\\\n\r\t\^<>_#@~〚〛$\*\&\,\=\|\'\(\)\{\}\?\"¯≡+\u0323]+) (MAX)
//WORDSLR allows comma - used to make app lem BL work when lem resp= includes comma (ex. lem resp='cf. 5.11, 3.10')
WORDSLR = ([^\/\\\n\r\t\^<>_#@~〚〛$\*\&\=\|\'\(\)\{\}\?\"¯≡+\u0323]+) (MAX)
// WORDS
WORDSTERM = ([^\n\r\t\^<>#@~〚〛$\*\&\=\|\{\}¯≡+\u0323]+) (MAX)
//WORDSFOREIGN = WORDSTERM
WORDSFOREIGN = ([^\n\r\t\^<>#@~〚〛$\*\&\=\|\{\}¯≡+\u0323]+) (MAX)
//very permisive for free text
WORDSLOOSE = ([^\n\r\t\^<>#@~〚〛$\*\&\=\|\{\}¯≡+\u0323]+) (MAX)
WORDSANDMORE = ([^<>#@~〚〛$\*\&\=\|\{\}¯≡\u0323]+) (MAX)
file
: [ANYSP s][transtag a][ANYSP ss] = <body>[ANYSP s][transtag a][ANYSP ss]</>
: =
transtag
: [BEGTRAN] "." [WORDDIV d] [ANYSP s][divtag t][ANYSP ss] [ENDTRAN] = <div xml:lang=[WORDDIV d] type="translation" xml:space="preserve">[ANYSP s][divtag t][ANYSP ss]</>
>: [BEGTRAN] "." [WORDDIV d] [ANYSP s][divtag t][ANYSP ss] [ENDTRAN] [ANYSP sss] [transtag more] = <div xml:lang=[WORDDIV d] type="translation" xml:space="preserve">[ANYSP s][divtag t][ANYSP ss]</> [ANYSP sss] [transtag more]
: [BEGTRAN] "." [WORDDIV d] [ANYSP s][ptag p][ANYSP ss] [ENDTRAN] = <div xml:lang=[WORDDIV d] type="translation" xml:space="preserve">[ANYSP s][ptag p][ANYSP ss]</>
>: [BEGTRAN] "." [WORDDIV d] [ANYSP s][ptag p][ANYSP ss] [ENDTRAN] [ANYSP sss] [transtag more] = <div xml:lang=[WORDDIV d] type="translation" xml:space="preserve">[ANYSP s][ptag p][ANYSP ss]</> [ANYSP sss] [transtag more]
divtag
: [BEGDIV] "." [WORDDIV d] " " [items a] [ENDDIV] = <div n=[WORDDIV d] type="textpart">[items a]</>
>: [BEGDIV] "." [WORDDIV n] "." [WORDDIV s] " " [items a] [ENDDIV] = <div n=[WORDDIV n] subtype =[WORDDIV s] type="textpart">[items a]</>
>: [BEGDIV] " " [items p] " " [ENDDIV] = <div type="textpart">[items p]</>
>: [BEGDIV] "." [WORDDIV d] " " [ANYSP s][ptag p][ANYSP ss] [ENDDIV] = <div n=[WORDDIV d] type="textpart">[ANYSP s][ptag p][ANYSP ss]</>
>: [BEGDIV] "." [WORDDIV d] " " [ANYSP s][ptag p][ANYSP ss] [ENDDIV] [ANYSP sss] [divtag more] = <div n=[WORDDIV d] type="textpart">[ANYSP s][ptag p][ANYSP ss]</> [ANYSP sss][divtag more]
>: [BEGDIV] "." [WORDDIV n] "." [WORDDIV s] " " [ANYSP ss][ptag p][ANYSP sss] [ENDDIV] = <div n=[WORDDIV n] subtype =[WORDDIV s] type="textpart">[ANYSP ss][ptag p][ANYSP sss]</>
>: [BEGDIV] "." [WORDDIV n] "." [WORDDIV s] " " [ANYSP ss][ptag p][ANYSP sss] [ENDDIV] [ANYSP ssss] [divtag more] = <div n=[WORDDIV n] subtype =[WORDDIV s] type="textpart">[ANYSP ss][ptag p][ANYSP sss]</> [ANYSP ssss][divtag more]
>: [BEGDIV] "." [WORDDIV d] " " [ANYSP s][divtag t][ANYSP ss] [ENDDIV] = <div n=[WORDDIV d] type="textpart">[ANYSP s][divtag t][ANYSP ss]</>
>: [BEGDIV] "." [WORDDIV d] " " [ANYSP s][divtag t][ANYSP ss] [ENDDIV] [ANYSP sss] [divtag more] = <div n=[WORDDIV d] type="textpart">[ANYSP s][divtag t][ANYSP ss]</> [ANYSP sss][divtag more]
>: [BEGDIV] "." [WORDDIV n] "." [WORDDIV s] " " [ANYSP ss][divtag t][ANYSP sss] [ENDDIV] = <div n=[WORDDIV n] subtype =[WORDDIV s] type="textpart">[ANYSP ss][divtag t][ANYSP sss]</>
>: [BEGDIV] "." [WORDDIV n] "." [WORDDIV s] " " [ANYSP ss][divtag t][ANYSP sss] [ENDDIV] [ANYSP ssss] [divtag more] = <div n=[WORDDIV n] subtype =[WORDDIV s] type="textpart">[ANYSP ss][divtag t][ANYSP sss]</> [ANYSP ssss][divtag more]
// this is equivalent to <ab> in normal L+
ptag
: [BEGP] [divtag d] [ENDP] = <p>[divtag d]</>
: [BEGP] [items z] [ENDP] = <p>[items z]</>
>: [BEGP] [items z] [ENDP] [ptag more] = <p>[items z]</> [ptag more]
>: [BEGP] [items z] [ENDP] [ANYSP sp] [ptag more] = <p>[items z]</> [ANYSP sp] [ptag more]
//>: [BEGP] [items z] [ENDP] [divtag more] = <p>[items z]</> [divtag more]
//>: [BEGP] [items z] [ENDP] [NL] [divtag more] = <p>[items z]</> [NL] [divtag more]
>: [BEGP] [ENDP] = <p></>
items
: [item i] [items more] = [item i] [items more]
>: [item p] = [item p]
item
: [app a] = [app a]
: [foreign f] = [foreign f]
: [linenumber l] = [linenumber l]
: [del d] = [del d]
: [term t] = [term t]
// : [lb l] = [lb l]
: [gap g] = [gap g]
: [note n] = [note n]
: [NL n] = [NL n]
>: [WORDS w] = [WORDS w]
>: [ANYLETTER a] = [ANYLETTER a]
linenumber
// : "(" [LINENUM n] ")." " " = <milestone unit="line" n=[LINENUM n]/>
// >: "(" [LINENUM n] ")." "div " = <milestone unit="line" n=[LINENUM n] rend="break"/>
// : "(" [LINENUM n] ")" = <milestone unit="line" n=[LINENUM n]/>
// >: "((" [LINENUM n] "))" = <milestone unit="line" n=[LINENUM n] rend="break"/>
//as per discusson 2-18-11, JC & JS make line number unique but similar to before
: "((" [LINENUM n] "))" = <milestone unit="line" n=[LINENUM n]/>
>: "(((" [LINENUM n] ")))" = <milestone unit="line" n=[LINENUM n] rend="break"/>
foreign
: "~|" [items a] "|~" [FOREIGNLANG lang] " " = <foreign xml:lang=[FOREIGNLANG lang]>[items a]</>
: "~|" [WORDSFOREIGN a] "|~" [FOREIGNLANG lang] " " = <foreign xml:lang=[FOREIGNLANG lang]>[WORDSFOREIGN a]</>
//: "~|" [WORDSFOREIGN a][items i] "|~" [WORD lang] " " = <foreign xml:lang=[WORD lang]>[WORDSFOREIGN a][items i]</>
//: "~|" [items i][WORDSFOREIGN a] "|~" [WORD lang] " " = <foreign xml:lang=[WORD lang]>[items i][WORDSFOREIGN a]</>
// removed from lang june-2010
// lb
// : "---" = <lb></>
term
: "<" [items def] "=" [WORDSTERM t] ">" = <term target=[WORDSTERM t]>[items def]</>
//with lang
////changed July 9 2010 : "<" [items def] "=" [WORDSTERM t] "~" [TERMLANG lang] ">" = <term target=[WORDSTERM t] xml:lang=[TERMLANG lang]>[items def]</>
: "<" [items def] "~" [TERMLANG lang] "=" [WORDSTERM t] ">" = <term target=[WORDSTERM t] xml:lang=[TERMLANG lang]>[items def]</>
>: "<" [WORDSTERM def] "=" [WORDSTERM t] ">" = <term target=[WORDSTERM t]>[WORDSTERM def]</>
//with lang
//changed July 9 2010 >: "<" [WORDSTERM def] "=" [WORDSTERM t] "~" [TERMLANG lang] ">" = <term target=[WORDSTERM t] xml:lang=[TERMLANG lang]>[WORDSTERM def]</>
>: "<" [WORDSTERM def] "~" [TERMLANG lang] "=" [WORDSTERM t] ">" = <term target=[WORDSTERM t] xml:lang=[TERMLANG lang]>[WORDSTERM def]</>
gap
//>: "[.?]" = <gap reason="lost" extent="unknown" unit="character"></>
//>: ".?" = <gap reason="illegible" extent="unknown" unit="character"></>
: "[...]" = <gap reason="lost" extent="unknown" unit="character"></>
: "..." = <gap reason="illegible" extent="unknown" unit="character"></>
del
: "〚" [WORDSLOOSE w] "〛" = <del>[WORDSLOOSE w]</>
//: "〚" [WORDS w] "〛" = <del>[WORDS w]</>
>: "〚" [items a] "〛" = <del>[items a]</>
app
//no type ??
//: [BEGOPT] [WORD a] "|:" [WORDSLR c] "|" [ENDOPT] = <app><lem resp=[WORDSLR c]>[WORD a]</></>
//: [BEGOPT] [WORD a] "|:|" [ENDOPT] = <app><lem>[WORD a]</></>
: [BEGOPT] [items a] "|:" [WORDSLOOSE c] "|" [ENDOPT] = <app><lem resp=[WORDSLOOSE c]>[items a]</></>
: [BEGOPT] [items a] "|:|" [ENDOPT] = <app><lem>[items a]</></>
: [BEGOPT] [WORDSLOOSE a] "|:" [WORDSLOOSE c] "|" [ENDOPT] = <app><lem resp=[WORDSLOOSE c]>[WORDSLOOSE a]</></>
: [BEGOPT] [WORDSLOOSE a] "|:|" [ENDOPT] = <app><lem>[WORDSLOOSE a]</></>
// BGU
//: [BEGOPT] [WORD a] "|BGU:" [WORDSLR c] "|" [ENDOPT] = <app type="BGU"><lem resp=[WORDSLR c]>[WORD a]</></>
//: [BEGOPT] [items a] "|BGU:" [WORDSLR c] "|" [ENDOPT] = <app type="BGU"><lem resp=[WORDSLR c]>[items a]</></>
//: [BEGOPT] [items a] "|BGU:|" [ENDOPT] = <app type="BGU"><lem>[items a]</></>
: [BEGOPT] [items a] "|BGU:" [WORDSLR c] "|" [ENDOPT] = <app type="BGU"><lem resp=[WORDSLR c]>[items a]</></>
: [BEGOPT] [items a] "|BGU:|" [ENDOPT] = <app type="BGU"><lem>[items a]</></>
: [BEGOPT] [WORDSLOOSE a] "|BGU:" [WORDSLOOSE c] "|" [ENDOPT] = <app type="BGU"><lem resp=[WORDSLOOSE c]>[WORDSLOOSE a]</></>
: [BEGOPT] [WORDSLOOSE a] "|BGU:|" [ENDOPT] = <app type="BGU"><lem>[WORDSLOOSE a]</></>
//BGU_DDbDP
//: [BEGOPT] [WORD a] "|BGU_DDbDP:" [WORDSLR c] "|" [ENDOPT] = <app type="BGU_DDbDP"><lem resp=[WORDSLR c]>[WORD a]</></>
//: [BEGOPT] [WORD a] "|BGU_DDbDP:|" [ENDOPT] = <app type="BGU_DDbDP"><lem>[WORD a]</></>
: [BEGOPT] [items a] "|BGU_DDbDP:" [WORDSLOOSE c] "|" [ENDOPT] = <app type="BGU_DDbDP"><lem resp=[WORDSLOOSE c]>[items a]</></>
: [BEGOPT] [items a] "|BGU_DDbDP:|" [ENDOPT] = <app type="BGU_DDbDP"><lem>[items a]</></>
: [BEGOPT] [WORDSLOOSE a] "|BGU_DDbDP:" [WORDSLOOSE c] "|" [ENDOPT] = <app type="BGU_DDbDP"><lem resp=[WORDSLOOSE c]>[WORDSLOOSE a]</></>
: [BEGOPT] [WORDSLOOSE a] "|BGU_DDbDP:|" [ENDOPT] = <app type="BGU_DDbDP"><lem>[WORDSLOOSE a]</></>
note
//version with lang, decided not needed since note will be in same lang as overall translation 6-25-2010
//: "\/*" [NOTELANG nl] " " [WORDSANDMORE a] "*\/" = <note xml:lang=[NOTELANG nl]>[WORDSANDMORE a]</>
: "\/*" [WORDSANDMORE a] "*\/" = <note>[WORDSANDMORE a]</>
// DONE:
// <gap reason="lost" extent="unknown" unit="character"/> [.?]
// <milestone unit="line" n="*"/>
// <milestone unit="line" n="*" rend="break"/>
// 133 <gap reason="illegible" extent="unknown" unit="character"/> .?
// <div xml:lang="de" type="translation" xml:space="preserve">
// <p>
// <lb>
// <foreign xml:lang="*">
// <term target="*">
// 18 <term xml:lang="la">
// 13 <del>
// <app type="BGU_DDbDP">
// <app type="BGU">
// <lem resp="">
// REMAINING:
// <app>
// 41 <term> //is this really allowed?
// 106 <certainty match=".." locus="value"/> (always inside lem)