Debian Codegraph @

tables/km-g1.utb

raw
1 #-index-name: Khmer
2 #-display-name: Khmer braille
3 #
4 #+language: km
5 #+type: literary
6 #+contraction: no
7 #+grade: 1
8 #+dots: 6
9 #+direction: both
10 #+system: cambodia
11 #
12 #-copyright: Sao Mai Center for the Blind <www.saomaicenter.org/en>
13 #-license: LGPLv2.1
14 #
15 # Copyright (C) 2018 by Sao Mai Center for the Blind <www.saomaicenter.org/en>
16 #
17 # This file is part of liblouis.
18 #
19 # liblouis is free software: you can redistribute it and/or modify it
20 # under the terms of the GNU Lesser General Public License as
21 # published by the Free Software Foundation, either version 2.1 of the
22 # License, or (at your option) any later version.
23 #
24 # liblouis is distributed in the hope that it will be useful, but
25 # WITHOUT ANY WARRANTY; without even the implied warranty of
26 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 # Lesser General Public License for more details.
28 #
29 # You should have received a copy of the GNU Lesser General Public
30 # License along with liblouis. If not, see
31 # <http://www.gnu.org/licenses/>.
32 #
33 # Created and maintained by: Dang Hoai Phuc <[email protected]>
34 # with help from Khemara Ly from Myanmar
35 #
36 #-author: Dang Hoai Phúc <[email protected]>
37 #-maintainer: Dang Hoai Phuc <[email protected]>
38 #
39 #-updated: 2020-11-17
40 #
41 # Based on <http://liblouis.io/braille-specs/khmer>
42
43 space \s 0 blank
44 space \t 9 tab
45 space \x000a 0 newline
46 space \x000c 0
47 space \x000d 0 carriage return
48 space \x001b 1b escape character for html back-translation
49 space \x00A0 a NO-BREAK SPACE <noBreak> 0020 NON-BREAKING SPACE
50 #space \x200b 0
51
52 # latin letters
53 lowercase a 1
54 lowercase b 12
55 lowercase c 14
56 lowercase d 145
57 lowercase e 15
58 lowercase f 124
59 lowercase g 1245
60 lowercase h 125
61 lowercase i 24
62 lowercase j 245
63 lowercase k 13
64 lowercase l 123
65 lowercase m 134
66 lowercase n 1345
67 lowercase o 135
68 lowercase p 1234
69 lowercase q 12345
70 lowercase r 1235
71 lowercase s 234
72 lowercase t 2345
73 lowercase u 136
74 lowercase v 1236
75 lowercase w 2456
76 lowercase x 1346
77 lowercase y 13456
78 lowercase z 1356
79
80 base uppercase A a
81 base uppercase B b
82 base uppercase C c
83 base uppercase D d
84 base uppercase E e
85 base uppercase F f
86 base uppercase G g
87 base uppercase H h
88 base uppercase I i
89 base uppercase J j
90 base uppercase K k
91 base uppercase L l
92 base uppercase M m
93 base uppercase N n
94 base uppercase O o
95 base uppercase P p
96 base uppercase Q q
97 base uppercase R r
98 base uppercase S s
99 base uppercase T t
100 base uppercase U u
101 base uppercase V v
102 base uppercase W w
103 base uppercase X x
104 base uppercase Y y
105 base uppercase Z z
106
107 # numbers definition
108 display 0 356
109 display 1 2
110 display 2 23
111 display 3 25
112 display 4 256
113 display 5 26
114 display 6 235
115 display 7 2356
116 display 8 236
117 display 9 35
118 digit 0 245
119 digit 1 1
120 digit 2 12
121 digit 3 14
122 digit 4 145
123 digit 5 15
124 digit 6 124
125 digit 7 1245
126 digit 8 125
127 digit 9 24
128 digit \x17e0 245
129 digit \x17e1 1
130 digit \x17e2 12
131 digit \x17e3 14
132 digit \x17e4 145
133 digit \x17e5 15
134 digit \x17e6 124
135 digit \x17e7 1245
136 digit \x17e8 125
137 digit \x17e9 24
138
139 litdigit 0 245
140 litdigit 1 1
141 litdigit 2 12
142 litdigit 3 14
143 litdigit 4 145
144 litdigit 5 15
145 litdigit 6 124
146 litdigit 7 1245
147 litdigit 8 125
148 litdigit 9 24
149 litdigit \x17e0 245
150 litdigit \x17e1 1
151 litdigit \x17e2 12
152 litdigit \x17e3 14
153 litdigit \x17e4 145
154 litdigit \x17e5 15
155 litdigit \x17e6 124
156 litdigit \x17e7 1245
157 litdigit \x17e8 125
158 litdigit \x17e9 24
159 # signs and punctuations definition
160 display ! 2346
161 punctuation ! 235
162 display " 5
163 punctuation " 236
164 #prepunc " 236
165 #postpunc " 356
166 display ? 1456
167 punctuation ? 236
168 match %[^_~]%<* " %[_.$]*%[a#] 236
169 match %[a#]%[_.$]* " %>*%[^_~] 356
170
171 display # 3456
172 sign # 3456
173 display $ 1246
174 sign $ 4-234
175 display % 146
176 sign % 4-356
177 math % 3456-245-356
178 display & 12346
179 sign & 4-12346
180 punctuation ' 3
181 display ( 12356
182 punctuation ( 2356
183 display ) 23456
184 punctuation ) 2356
185 display * 16
186 sign * 5-236
187 display + 346
188 math + 5-235
189 display , 6
190 punctuation , 6
191 punctuation - 36
192 math - 5-36
193 hyphen - 36
194 display . 46
195 punctuation . 256
196 #decpoint . 3
197 display / 34
198 sign / 34
199 math / 5-34
200 punctuation / 34
201 #display : 156
202 #punctuation : 45
203 display ; 56
204 punctuation ; 23
205 display < 126
206 math < 5-246
207 display = 123456
208 math = 5-2356
209 display > 345
210 punctuation > 5-135
211 display @ 47
212 sign @ 4
213
214 display [ 2467
215 punctuation [ 46-126
216 display \\ 12567
217 sign \\ 4-16
218 display ] 124567
219 punctuation ] 46-345
220 display ^ 45
221 sign ^ 4-26
222 display : 156
223 punctuation : 45
224 display _ 456
225 sign _ 4-456
226 display ` 4
227 sign ` 4-4 grave accent
228
229 display } 12456
230 punctuation } 456-345
231 display | 1256
232 sign | 456-1256
233 display { 246
234 punctuation { 456-126
235 display ~ 45
236 math ~ 4-35
237 punctuation \x17D4 123456
238 punctuation \x201C 236
239 punctuation \x201D 356
240
241 include braille-patterns.cti
242
243
244
245 # two special cases, not put v infront of subscript consonants
246 #always \x17D2\x178B 36-23456
247 #always \x17D2\x178D 356-23456
248 # letters with two character codes for each, all are from dependent vowels
249 always \x17BB\x17C6 1246
250 always \x17B6\x17C6 1356
251 always \x17BB\x17C7 1346
252 always \x17C1\x17C7 136
253 always \x17C4\x17C7 2346
254 # add v subscript for consonants
255 letter \x17D2 1236
256 # if o in print before 4 vowels below, should be placed after these 4 vowels
257 always \x17A2\x17BE 146-135
258 #always \x17A2\x17C1 124-135
259 noback pass2 @135-124 @124-135
260 always \x17A2\x17C2 126-135
261 always \x17A2\x17C3 24-135
262 # regular consonants Dot pattern for regular consonants
263 letter \x1780 1245
264 letter \x1781 13
265 #letter \x1782 6-1245
266 letter គ 6-1245
267 letter \x1783 6-13
268 letter \x1784 12456
269 letter \x1785 245
270 letter \x1786 346
271 letter \x1787 6-245
272 letter \x1788 6-346
273 letter \x1789 6-1456
274 letter \x178A 145
275 letter \x178B 36-23456
276 letter \x178C 6-145
277 letter \x178D 356-23456
278 letter \x178E 1345
279 letter \x178F 2345
280 letter \x1790 23456
281 letter \x1791 6-2345
282 letter \x1792 6-23456
283 letter \x1793 6-1345
284 letter \x1794 12
285 letter \x1795 1234
286 letter \x1796 12346
287 letter \x1797 6-1234
288 letter \x1798 134
289 letter \x1799 6-13456
290 letter \x179A 1235
291 letter \x179B 6-123
292 letter \x179C 2456
293 letter \x179F 234
294 letter \x17A0 125
295 letter \x17A1 123
296 letter \x17A2 135
297 # independent vowels #Dot patern for independent vowels
298 letter \x17A5 6-34
299 letter \x17A6 15-1
300 letter \x17A7 14-1
301 #letter \x17A8
302 letter \x17A9 6-25
303 letter \x17AA 1256
304 letter \x17B3 456-14
305 letter \x17AB 6-1346
306 letter \x17AC 1346-1
307 letter \x17AD 1456
308 letter \x17AE 1456-1
309 letter \x17AF 5
310 letter \x17B0 124-1
311 letter \x17B1 156-1
312 letter \x17B2 156-1
313 #dependent vowels # Dot paterns for dependent vowels
314 letter \x17B6 16
315 letter \x17B7 34
316 letter \x17B8 15
317 letter \x17B9 246
318 letter \x17BA 26
319 letter \x17BB 14
320 letter \x17BC 25
321 letter \x17BD 23
322 letter \x17BE 146
323 letter \x17BF 12345
324 letter \x17C0 12356
325 letter \x17C1 124
326 letter \x17C2 126
327 letter \x17C3 24
328 letter \x17C4 156
329 letter \x17C5 456
330 #letter \x17BB\x17C6 1246
331 letter \x17C6 13456
332 #letter \x17B6\x17C6 1356
333 letter \x17C7 1
334 #letter \x17BB\x17C7 1346
335 #letter \x17C1\x17C7 136
336 #letter \x17C4\x17C7 2346
337 #additional letters not found on wiki page
338 letter \x17CB 35
339 letter \x17d0 345
340 letter \x17c8 45
341 letter \x17c9 4
342 letter \x17cf 3
343 letter \x17cd 356
344 letter \x17ca 36
345 letter \x17d7 2
346 letter \x17cc 2356
347 letter \x200c 16-5-13
348
349 numsign 3456
350 letsign 56
351 capsletter 6
352 begcapsword 6-6
353 endcapsword 6-3
354 lencapsphrase 3
355 begcapsphrase 6-6-6
356 begcaps 6-6-6
357 endcaps 6-3
358
359 # time processing with : as saperator sign
360 noback match %# :0 %# 45-245
361 noback match %# :1 %# 45-1
362 noback match %# :2 %# 45-12
363 noback match %# :3 %# 45-14
364 noback match %# :4 %# 45-145
365 noback match %# :5 %# 45-15
366 noback match %# '0 %# 3-245
367 noback match %# '1 %# 3-1
368 noback match %# '2 %# 3-12
369 noback match %# '3 %# 3-14
370 noback match %# '4 %# 3-145
371 noback match %# '5 %# 3-15
372 # unknown character
373 replace \x200b
374 # add space between digits and letters
375 #noback correct $d$l "\s"
376 #noback context $d[$l] @0*
377 noback pass2 @245-56 @245-0
378 noback pass2 @1-56 @1-0
379 noback pass2 @12-56 @12-0
380 noback pass2 @14-56 @14-0
381 noback pass2 @145-56 @145-0
382 noback pass2 @15-56 @15-0
383 noback pass2 @124-56 @124-0
384 noback pass2 @1245-56 @1245-0
385 noback pass2 @125-56 @125-0
386 noback pass2 @24-56 @24-0
387
388 # moving vowels and subscript consonants to before dependent consonants
389 attribute consonant \x1780\x1781\x1782\x1783\x1784\x1785\x1786\x1787\x1788\x1789\x178A\x178B\x178C\x178D\x178E\x178F\x1790\x1791\x1792\x1793\x1794\x1795\x1796\x1797\x1798\x1799\x179A\x179B\x179C\x179F\x17A0\x17A1\x17A2
390 # place vowels before subscripted and dependent consonants
391 noback correct [%consonant]"\x17D2\x179A\x17BE" "\x17BE\x17D2\x179A"*
392 noback correct [%consonant]"\x17D2\x179A\x17C1" "\x17C1\x17D2\x179A"*
393 noback correct [%consonant]"\x17D2\x179A\x17C2" "\x17C2\x17D2\x179A"*
394 noback correct [%consonant]"\x17D2\x179A\x17C3" "\x17C3\x17D2\x179A"*
395 # place vowels before consonants
396 noback correct [%consonant]"\x17BE" "\x17BE"*
397 noback correct [%consonant]"\x17C1" "\x17C1"*
398 noback correct [%consonant]"\x17C2" "\x17C2"*
399 noback correct [%consonant]"\x17C3" "\x17C3"*
400
401 noback correct [%consonant"\x17d2"%consonant]"\x17BE" "\x17BE"*
402 noback correct [%consonant"\x17d2"%consonant]"\x17C1" "\x17C1"*
403 noback correct [%consonant"\x17d2"%consonant]"\x17C2" "\x17C2"*
404 noback correct [%consonant"\x17d2"%consonant]"\x17C3" "\x17C3"*
405
406
407
408 noback correct [%consonant]"\x17D2\x179A" "\x17D2\x179A"*
409
410 #class vowelbefore \x17C1\x17C2\x17C3\x17BE
411 #noback context "\x17D2\x179A"[%consonant]"\x17BE" ?
412 #"\x17BE\x17D2\x179A"*