Debian Codegraph @

tables/da-dk-g26l-lit_1993.ctb

raw
1 # Liblouis: Danish table for 6 dots grade 1.5 (grade 2l) literary, forward translation only 1993
2 #
3 # Copyright (C) 2014, 2016-2021, 2023, Bue Vester-Andersen <[email protected]>
4 #
5 # This file is part of liblouis.
6 #
7 # liblouis is free software: you can redistribute it and/or modify it
8 # under the terms of the GNU Lesser General Public License as
9 # published by the Free Software Foundation, either version 2.1 of the
10 # License, or (at your option) any later version.
11 #
12 # liblouis is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Lesser General Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with liblouis. If not, see
19 # <http://www.gnu.org/licenses/>.
20 #
21 # Version: Bue Vester-Andersen, December 2022
22
23 ### Table Metadata
24
25 #-name: Dansk lille forkortelse 6-punkt litterær 1993
26 #-index-name: Danish, partially contracted, 6-dot, 1993
27 #-display-name: Danish 6-dot partially contracted braille (1993 standard)
28
29 #+language: da
30 #+type: literary
31 #+contraction: partial
32 #+grade: 1.5
33 #+dots: 6
34 #+direction: forward
35 #+system: ddp
36 #+version: 1993
37
38 # Display opcodes
39 include da-dk-octobraille_1993.dis
40
41 ### Spaces
42
43 # These ctrl-chars have to have a representation, so that they can be properly converted back and forth.
44 space \t 2478 CHARACTER TABULATION
45 space \n 678 LINE FEED (LF)
46 space \v 1368 LINE TABULATION
47 space \f 12378 FORM FEED (FF)
48 space \r 257 CARRIAGE RETURN (CR)
49 space \x00a0 a
50
51 include spaces.uti
52
53 ### Character definitions
54
55 # Definition of dot cells
56 punctuation ! 235 EXCLAMATION MARK
57 punctuation " 2356 QUOTATION MARK
58 punctuation ' 4 APOSTROPHE
59 punctuation ( 236 LEFT PARENTHESIS
60 punctuation ) 356 RIGHT PARENTHESIS
61 punctuation , 2 COMMA
62 punctuation - 36 HYPHEN-MINUS
63 punctuation . 3 FULL STOP
64 punctuation / 34 SLASH
65 punctuation : 25 COLON
66 punctuation ; 23 SEMICOLON
67 punctuation ? 26 QUESTION MARK
68 lowercase a 1
69 lowercase b 12
70 lowercase c 14
71 lowercase d 145
72 lowercase e 15
73 lowercase f 124
74 lowercase g 1245
75 lowercase h 125
76 lowercase i 24
77 lowercase j 245
78 lowercase k 13
79 lowercase l 123
80 lowercase m 134
81 lowercase n 1345
82 lowercase o 135
83 lowercase p 1234
84 lowercase r 1235
85 lowercase s 234
86 lowercase t 2345
87 lowercase u 136
88 lowercase v 1236
89 lowercase y 13456
90
91 #use 8 dots for the following chars to avoid conflict with indicators
92 lowercase q 123457
93 lowercase w 24567
94 lowercase x 13467
95 lowercase z 13567
96 punctuation | 4568 VERTICAL LINE
97 punctuation ~ 467 TILDE (changed by pass 2 to not conflict with indicators
98 lowercase \x00fc 12567
99
100 include digits6Dots.uti
101
102 punctuation \x00a7 346 SECTION SIGN (0xa7)
103
104 lowercase \x00e5 16 LATIN LETTER A WITH RING ABOVE
105 lowercase \x00e6 345 LATIN LETTER AE
106 lowercase \x00f8 246 LATIN LETTER O WITH STROKE
107
108 # Uppercase letters
109 base uppercase A a
110 base uppercase B b
111 base uppercase C c
112 base uppercase D d
113 base uppercase E e
114 base uppercase F f
115 base uppercase G g
116 base uppercase H h
117 base uppercase I i
118 base uppercase J j
119 base uppercase K k
120 base uppercase L l
121 base uppercase M m
122 base uppercase N n
123 base uppercase O o
124 base uppercase P p
125 base uppercase R r
126 base uppercase S s
127 base uppercase T t
128 base uppercase U u
129 base uppercase V v
130 base uppercase Y y
131 base uppercase Q q
132 base uppercase W w
133 base uppercase X x
134 base uppercase Z z
135 base uppercase \x00dc \x00fc
136 base uppercase \x00c5 \x00e5 LATIN LETTER A WITH RING ABOVE
137 base uppercase \x00c6 \x00e6 LATIN LETTER AE
138 base uppercase \x00d8 \x00f8 LATIN LETTER O WITH STROKE
139
140 # cover all other Braille patterns
141 include braille-patterns.cti
142
143 # Characters with two or more cells
144
145 punctuation # 45-3456 NUMBER SIGN
146 sign $ 45-256 DOLLAR SIGN
147 math % 245-356 PERCENT SIGN
148 sign & 6-12346 AMPERSAND
149 punctuation * 6-35 ASTERISK
150 math + 45-235 PLUS SIGN
151 math < 45-134 LESS-THAN SIGN
152 math = 45-2356 EQUALS SIGN
153 math > 45-234 GREATER-THAN SIGN
154 sign @ 45-1 COMMERCIAL AT
155 punctuation [ 5-236 LEFT SQUARE BRACKET
156 punctuation \\ 45-16 REVERSE SLASH
157 punctuation ] 5-356 RIGHT SQUARE BRACKET
158 punctuation ^ 45-346 CIRCUMFLEX ACCENT
159 punctuation _ 45-36 LOW LINE
160 punctuation ` 4 GRAVE ACCENT
161 punctuation { 45-246 LEFT CURLY BRACKET
162 punctuation } 45-135 RIGHT CURLY BRACKET
163 math \x00f7 45-256 DIVISION SIGN
164
165 # Misc unicode characters
166 include da-dk-6miscChars_1993.cti
167
168 # Litdigits
169 include litdigits6Dots.uti
170
171 undefined 26
172
173 ### Braille indicators and special characters
174
175 #hyphen - 36
176
177 letsign 6
178
179 noletsign Ii\x00df\x0149\x0152\x0153
180
181 # Emphasis opcodes
182 emphclass italic
183 emphclass underline
184 emphclass bold
185
186 begemphphrase italic 56
187 endemphphrase italic after 56
188
189 begemphphrase bold 56
190 endemphphrase bold after 56
191
192 begemphphrase underline 56
193 endemphphrase underline after 56
194
195 capsletter 46
196 begcapsword 456
197 endcapsword 68 # Used during back-translation to stop overflow of capsword
198 multind 6-46 letsign capsletter
199 multind 46-6 capsletter letsign
200 multind 6-456 letsign begcapsword
201 multind 68-6-46 endcapsword letsign capsletter
202 multind 68-6-456 endcapsword letsign begcapsword
203 multind 68-6 endcapsword letsign
204
205 numsign 3456
206 multind 6-3456 letsign numsign
207
208 #class of none-space characters that demand double dashes
209 # Used in context lines later.
210 #must be the first class defined.
211 attribute charsWDoubleDash .,?!/:"'() # class w
212
213 ### Correct - forward translation
214
215 # Chars that don't require a space before percent and permille:
216 attribute charsBeforePercent "(\x201e\x0084\x201c\x0093\x201d\x0094\x00ab\x00bb #class x
217 noback correct `["%"] *
218 noback correct !$sx["%"] "\s%"
219 noback correct `["\x2030"] *
220 noback correct !$sx["\x2030"] "\s\x2030"
221 noback correct `["\x0089"] *
222 noback correct !$sx["\x0089"] "\s\x2030"
223
224 # Chars to be treated like digits when switching back to letter mode
225 attribute extraDigits \x00bc\x00bd\x00be
226
227 #Use the "correct" opcode to convert chars that can't be back-translated
228 # and make the table more simple.
229
230 # Dashes
231 attribute dashes \x2013\x2014\x0096\x0097\x00ad
232 noback correct %dashes "-"
233
234 attribute quotes \x201e\x0084\x201c\x0093\x201d\x0094\x00ab\x00bb
235 noback correct %quotes "\""
236
237 attribute apostrophes `\x201a\x0082\x2039\x008b\x2018\x0091\x2019\x0092\x203a\x009b\x00b4
238 noback correct %apostrophes "'"
239
240 # Convert most single caps to lowercase
241
242 #Special abbreviations with imbedded small letters.
243 # Must be handled by case in this version of liblouis
244 noback correct "KAbB" "KABB"
245 noback correct "CUDiM" "CUDIM"
246
247 swapcc UpperLower ABCDEFGHIJKLMNOPQRSTUVWXYZ\x00c0\x00c1\x00c2\x00c3\x00c4\x00c5\x00c6\x00c7\x00c8\x00c9\x00ca\x00cb\x00cc\x00cd\x00ce\x00cf\x00d0\x00d1\x00d2\x00d3\x00d4\x00d5\x00d6\x00d8\x00d9\x00da\x00db\x00dc\x00dd\x00de\x008a\x008c abcdefghijklmnopqrstuvwxyz\x00e0\x00e1\x00e2\x00e3\x00e4\x00e5\x00e6\x00e7\x00e8\x00e9\x00ea\x00eb\x00ec\x00ed\x00ee\x00ef\x00f0\x00f1\x00f2\x00f3\x00f4\x00f5\x00f6\x00f8\x00f9\x00fa\x00fb\x00fc\x00fd\x00fe\x009a\x009c
248 swapcc UpperLowerExt \x0100\x0102\x0104\x0106\x0108\x010a\x010c\x010e\x0110\x0112\x0114\x0116\x0118\x011a\x011c\x011e\x0120\x0122\x0124\x0126\x0128\x012a\x012c\x012e\x0130\x0132\x0134\x0136\x0139\x013b\x013d\x013f\x0141\x0143\x0145\x0147\x014a\x014c\x014e\x0150\x0152\x0154\x0156\x0158\x015a\x015c\x015e\x0160\x0162\x0164\x0166\x0168\x016a\x016c\x016e\x0170\x0172\x0174\x0176\x0178\x0179\x017b\x017d\x0386\x0388\x0389\x038a\x038c\x038e\x038f\x0391\x0392\x0393\x0394\x0395\x0396\x0397\x0398\x0399\x039a\x039b\x039c\x039d\x039e\x039f\x03a0\x03a1\x03a3\x03a4\x03a5\x03a6\x03a7\x03a8\x03a9 \x0101\x0103\x0105\x0107\x0109\x010b\x010d\x010f\x0111\x0113\x0115\x0117\x0119\x011b\x011d\x011f\x0121\x0123\x0125\x0127\x0129\x012b\x012d\x012f\x0131\x0133\x0135\x0137\x013a\x013c\x013e\x0140\x0142\x0144\x0146\x0148\x014b\x014d\x014f\x0151\x0153\x0155\x0157\x0159\x015b\x015d\x015f\x0161\x0163\x0165\x0167\x0169\x016b\x016d\x016f\x0171\x0173\x0175\x0177\x00ff\x017a\x017c\x017e\x03ac\x03ad\x03ae\x03af\x03cc\x03cd\x03ce\x03b1\x03b2\x03b3\x03b4\x03b5\x03b6\x03b7\x03b8\x03b9\x03ba\x03bb\x03bc\x03bd\x03be\x03bf\x03c0\x03c1\x03c3\x03c4\x03c5\x03c6\x03c7\x03c8\x03c9
249
250 # I is a special case
251 noback correct _$sp["I"]$sp "i"
252 noback correct `["I"]$sp "i"
253 noback correct _$sp["I"]~ "i"
254
255 noback correct $sSpu[%UpperLower]$u %UpperLower
256 noback correct `[%UpperLower]$u %UpperLower
257
258 noback correct $sSpu[%UpperLowerExt]$u %UpperLowerExt
259 noback correct `[%UpperLowerExt]$u %UpperLowerExt
260
261 ### Pass 1
262
263 # Punctuations, math and numbers
264 midnum , 2
265 midnum . 3
266 # the following rule is doubtful, but probably does not apply.
267 #midnum - 36
268 endnum - 36
269 midnum / 34
270 midnum : 25
271 nofor midnum ^ 346
272 nofor midnum ^ 45-346
273
274 midnum ^ 45-346
275 midnum \x00d7 45-3-3456
276
277 # various back rules for math signs etc.
278 nofor midnum % 0-245-356-0-3456
279 nofor endnum % 0-245-356
280 nofor endnum \x2030 0-245-356-356
281 nofor midnum \s 3456
282 nofor midnum \x00d7 45-3-3456
283 nofor midnum \x00d7 45-3
284 nofor midnum \x00d7 3-3456
285
286 # Remove space between § and numbers.
287 begnum § 346
288 begnum §\s 346
289 begnum §§\s 346-346
290 always §§ 346-346
291
292 # Punctuation
293 prepunc " 2356
294 postpunc " 2356
295 always /\s 6-34-0
296 always \s/ 0-6-34
297 nofor always / 6-34
298 prepunc - 36
299 postpunc - 36
300 nofor always \s-\s 0-36-36-0
301 always :- 25-36
302 always ;- 23-36
303 always --- 36-36-36
304 always ---- 36-36-36-36
305 always ----- 36-36-36-36-36
306 # Star enclosed by parentheses
307 always (*) 236-35-356
308
309 before punctuation before sign always ( 6-236
310
311 # these characters must be separated from ")" by a letsign.
312 attribute SepToRightpar Jj%'\x2030\x0089\x201a\x0082\x2039\x009b\x2018\x0091\x2019\x0092\x203a\x009b
313 after SepToRightpar always ) 6-356
314
315 prepunc ( 236
316 postpunc ) 356
317 always .) 3-356
318 always ( 6-236
319 always ) 6-356
320
321 # extra back rules for ")"
322 nofor after punctuation always ) 356
323 nofor after punctuation always ) 68-356
324 nofor always \x00b0 4-356
325 nofor always ') 4-6-356
326 nofor always ") 2356-356
327 nofor endword j) 245-356
328 nofor always ) 6-356
329
330 always ... 3-3-3
331
332 #inverted exclamation
333 always \x00a1 6-256
334
335 ### Contractions ###
336
337 #Special sequences, urls emails and file names.
338
339 nocont $
340 nocont \x005c
341 nocont @
342 nocont ://
343 nocont www
344
345 #Words
346 word at 1
347 word bliver 12
348 word den 12346
349 word der 23456
350 word det 2346
351 word de 1456
352 word du 145
353 word efter 1356
354 word eller 15
355 word en 126
356 word er 156
357 word et 346
358 word for 124
359 word før 246
360 word gennem 12456
361 word gør 1245
362 word han 13456
363 word har 125
364 word hun 136
365 word hvad 2456
366 word hvor 34
367 word jeg 245
368 word kan 13
369 word lige 123
370 word med 134
371 word men 146
372 word ned 1246
373 word når 1345
374 word og 14
375 word op 135
376 word over 1346
377 word på 1234
378 word ret 12356
379 word rigtig 1235
380 word skal 123456
381 word som 234
382 word så 16
383 word te 1256
384 word til 2345
385 word under 12345
386 word ve 3456
387 word ved 1236
388 word være 345
389
390 # Common combinations of one word contractions with slash
391 word af/på 356-34-1234
392 word af/på 356-34-68-1234
393 word du/i 145-34-24
394 word du/i 145-34-68-24
395 word eller/og 15-34-14
396 word eller/og 15-34-68-14
397 word fra/til 235-34-2345
398 word fra/til 235-34-68-2345
399 word han/hun 13456-34-136
400 word han/hun 13456-34-68-136
401 word hun/han 136-34-13456
402 word hun/han 136-34-68-13456
403 word i/du 24-34-145
404 word i/du 24-34-68-145
405 word og/eller 14-34-15
406 word og/eller 14-34-68-15
407 word over/under 1346-34-12345
408 word over/under 1346-34-68-12345
409 word på/af 1234-34-356
410 word på/af 1234-34-68-356
411 word til/fra 2345-34-235
412 word til/fra 2345-34-68-235
413 word under/over 12345-34-1346
414 word under/over 12345-34-68-1346
415
416 # no backtrans of ^1 and `2. use contractions
417 nofor always eta 346-1
418 nofor always etb 346-12
419 always etc 346-14
420
421 # Ensure no one-letter word contraction before or after a dash
422
423 endword -af 36-1-124
424 begword af- 1-124-36
425 endword -altid 36-1-2345-145
426 begword altid- 1-2345-145-36
427 endword -at 36-1-2345
428 endword -a 36-6-1
429 begword at- 1-2345-36
430 endword -og 36-135-1245
431 endword -c 36-6-14
432 begword og- 135-1245-36
433 endword -du 36-145-136
434 endword -d 36-6-145
435 begword du- 145-136-36
436 endword -efter 36-15-124-2345-156
437 endword -z 36-6-1356
438 begword efter- 15-124-2345-156-36
439 midword -efter- 36-1356-36
440 endword -e 36-6-15
441 endword -for 36-124-1346
442 endword -f 36-6-124
443 begword for- 124-1346-36
444 endword -fra 36-124-1235-1
445 begword fra- 124-1235-1-36
446 endword -g 36-6-1245
447 endword -gennem 36-1245-126-1246-134
448 begword gennem- 1245-126-1246-134-36
449 endword -ham 36-125-1-134
450 begword ham- 125-1-134-36
451 endword -han 36-125-1-1345
452 endword -y 36-6-13456
453 begword han- 125-1-1345-36
454 endword -har 36-125-1-1235
455 endword -h 36-6-125
456 begword har- 125-1-1235-36
457 endword -hun 36-125-136-1345
458 endword -u 36-6-136
459 begword hun- 125-136-1345-36
460 endword -j 36-6-245
461 endword -kan 36-13-1-1345
462 endword -k 36-6-13
463 begword kan- 13-1-1345-36
464 endword -lige 36-123-24-12456
465 endword -l 36-6-123
466 begword lige- 123-24-12456-36
467 endword -med 36-146-145
468 endword -m 36-6-134
469 begword med- 146-145-36
470 endword -men 36-134-126
471 begword men- 134-126-36
472 endword -ned 36-1246-145
473 begword ned- 1246-145-36
474 endword -når 36-1345-16-1235
475 endword -n 36-6-1345
476 begword når- 1345-16-1235-36
477 endword -op 36-135-1234
478 endword -o 36-6-135
479 begword op- 135-1234-36
480 endword -over 36-135-1236-156
481 endword -x 36-6-1346
482 begword over- 135-1236-156-36
483 endword -på 36-1234-16
484 endword -p 36-6-1234
485 begword på- 1234-16-36
486 midword -på- 36-1234-36
487 endword -ret 36-1235-346
488 begword ret- 1235-346-36
489 midword -ret- 36-12356-36
490 endword -rigtig 36-1235-35-2345-35
491 endword -r 36-6-1235
492 begword rigtig- 1235-35-2345-35-36
493 midword -rigtig- 36-1235-36
494 endword -skal 36-123456-1-123
495 begword skal- 123456-1-123-36
496 midword -skal- 36-123456-36
497 endword -som 36-234-135-134
498 endword -s 36-6-234
499 begword som- 234-135-134-36
500 midword -som- 36-234-36
501 endword -så 36-234-16
502 endword -å 36-6-16
503 begword så- 234-16-36
504 endword -til 36-2345-24-123
505 endword -t 36-6-2345
506 begword til- 2345-24-123-36
507 midword -til- 36-2345-36
508 endword -under 36-136-1345-23456
509 begword under- 136-1345-23456-36
510 midword -under- 36-12345-36
511 endword -ved 36-1236-15-145
512 endword -v 36-6-1236
513 begword ved- 1236-15-145-36
514 midword -ved- 36-1236-36
515
516
517 ### Context rules - forward translation
518
519 # Substitutions for joinnum rules with common math signs
520 noback context $dy$s["-"$s]$dy @36
521 noback context $dy$s["+"$s]$dy @235
522 noback context $dy$s["\x00d7"$s]$dy @3
523 noback context $dy$s["\x00f7"$s]$dy @256
524 noback context $dy$s["="$s]$dy @2356
525
526 # Space on each side of = when between letters or punctuation.
527 noback context $lp["="]$lp @0-2356-0
528
529 # Exclamation at beginning of string
530 noback context `["!"] @6-235
531
532 # Ensure two dashes where appropriate.
533 noback context $w["-"]$w @36
534 noback context $sw["-"]$sw @36-36
535 noback context `["-"]$sw @36-36
536 noback context $sw["-"]~ @36-36
537 noback context !$sw["-"]~ @36
538 noback context `["-"]~ @36-36
539
540 # Ensure letsign between letter and numsign
541 noback context $l[]$D @6
542
543 # No "nd", "hv", "or", or "st" after a digit and a letsign
544 noback context $dy["hv"] @6-125-1236
545 noback context $dy$Spm["hv"] @6-125-1236
546 noback context $dy["nd"] @6-1345-145
547 noback context $dy$Spm["nd"] @6-1345-145
548 noback context $dy["or"] @6-135-1235
549 noback context $dy$Spm["or"] @6-135-1235
550 noback context $dy["st"] @6-234-2345
551 noback context $dy$Spm["st"] @6-234-2345
552 noback context $dy["te"] @6-2345-15
553 noback context $dy$Spm["te"] @6-2345-15
554
555
556 #ensure dot 6 between a digit and a letter
557 noback context $dy[]$u @6
558 noback context $dy$Spm.[]$u @6
559
560 ### Pass 2 - forward translation
561
562 # Correct chars defined as 8 dots because they include letsign
563 noback pass2 @467 @45-6
564 noback pass2 @4568 @45-456
565 noback pass2 @123457 @6-12345
566 noback pass2 @24567 @6-2456
567 noback pass2 @13467 @6-1346
568 noback pass2 @13567 @6-1356
569 noback pass2 @12567 @6-1256
570
571 # Show endcapsword as dot 6 (letsign)
572 noback pass2 @68 @6
573
574 noback pass2 @6-5 @5 # no letsign before letters with accent
575 noback pass2 @6-46-5 @46-5 # no letsign before cap letters with accent
576 noback pass2 _$D[@6-46-6] *
577 noback pass2 _$D[@6-46] *
578 noback pass2 @6-46-6 @46-6 # Ensure correct order and no double letsign
579 noback pass2 @6-46 @46-6 # Ensure correct order
580
581 ### Pass 3 - forward translation
582
583 # Ensure there is only one letsign
584 noback pass3 @6-6 @6
585 # Ensure there is only one emphasis sign
586 noback pass3 @56-56 @56
587 noback pass3 @56-56-56 @56
588