Debian Codegraph @

tables/da-dk-g16.ctb

raw
1 # Liblouis: Danish table for 6 dots grade 1 forward and backward translation 2022
2 #
3 # Copyright (C) 2014, 2016-2024, 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 # This is the Danish table for 6 dots grade 1 Braille (fuldskrift) DDP2022.
22 # Use this table for translation and back-translation of Danish 6 dots grade 1 Braille.
23 # See also: Den Danske Punktskrift 2022
24 # Det Danske Punktskriftsnævn
25 # https://www.blind.dk/punktskrift-2022
26 #
27 # Version: Bue Vester-Andersen, December 2022
28
29 ### Table Metadata
30
31 #-name: Dansk fuldskrift 6-punkt 2022
32 #-index-name: Danish, uncontracted, 6-dot, 2022
33 #-display-name: Danish 6-dot uncontracted braille (2022 standard)
34
35 #+language: da
36 #+type: literary
37 #+contraction: no
38 #+grade: 1
39 #+dots: 6
40 #+direction: both
41 #+system: ddp
42 #+version: 2022
43
44 # Display opcodes
45 include da-dk-octobraille.dis
46
47 ### Spaces
48 include spaces.uti
49
50 ### Character definitions
51
52 # Definition of dot cells
53 punctuation ! 235 EXCLAMATION MARK
54 punctuation " 2356 QUOTATION MARK
55 sign & 12346 AMPERSAND
56 punctuation ' 4 APOSTROPHE
57 punctuation ( 236 LEFT PARENTHESIS
58 punctuation ) 356 RIGHT PARENTHESIS
59 punctuation * 35 ASTERISK
60 punctuation , 2 COMMA
61 punctuation - 36 HYPHEN-MINUS
62 punctuation . 3 FULL STOP
63 punctuation / 34 SLASH
64 punctuation : 25 COLON
65 punctuation ; 23 SEMICOLON
66 punctuation ? 26 QUESTION MARK
67 include latinLetterDef6Dots.uti
68
69 include digits6Dots.uti
70
71 punctuation \x00a7 346 SECTION SIGN (0xa7)
72
73 lowercase \x00e0 12356 LATIN LETTER A WITH GRAVE
74 lowercase \x00e5 16 LATIN LETTER A WITH RING ABOVE
75 lowercase \x00e6 345 LATIN LETTER AE
76 lowercase \x00e8 2346 LATIN LETTER E WITH GRAVE
77 lowercase \x00e9 123456 LATIN LETTER E WITH ACUTE
78 lowercase \x00f8 246 LATIN LETTER O WITH STROKE
79 lowercase \x00fc 1256 LATIN LETTER U WITH DIAERESIS
80
81 base uppercase \x00c0 \x00e0 LATIN LETTER A WITH GRAVE
82 base uppercase \x00c5 \x00e5 LATIN LETTER A WITH RING ABOVE
83 base uppercase \x00c6 \x00e6 LATIN LETTER AE
84 base uppercase \x00c8 \x00e8 LATIN LETTER E WITH GRAVE
85 base uppercase \x00c9 \x00e9 LATIN LETTER E WITH ACUTE
86 base uppercase \x00d8 \x00f8 LATIN LETTER O WITH STROKE
87 base uppercase \x00dc \x00fc LATIN LETTER U WITH DIAERESIS
88
89
90 # cover all other Braille patterns
91 include braille-patterns.cti
92
93 # Characters with two or more cells
94
95 punctuation # 45-3456 NUMBER SIGN
96 sign $ 45-145 DOLLAR SIGN
97 math % 245-356 PERCENT SIGN
98 math + 45-235 PLUS SIGN
99 math < 45-134 LESS-THAN SIGN
100 math = 45-2356 EQUALS SIGN
101 math > 45-234 GREATER-THAN SIGN
102 sign @ 45-1 COMMERCIAL AT
103 punctuation [ 5-236 LEFT SQUARE BRACKET
104 punctuation \\ 45-34 REVERSE SLASH
105 punctuation ] 5-356 RIGHT SQUARE BRACKET
106 punctuation ^ 45-346 CIRCUMFLEX ACCENT
107 punctuation _ 45-36 LOW LINE
108 punctuation ` 4 GRAVE ACCENT
109 punctuation { 45-246 LEFT CURLY BRACKET
110 punctuation | 45-1236 VERTICAL LINE
111 punctuation } 45-135 RIGHT CURLY BRACKET
112 punctuation ~ 45-23 TILDE
113 math \x00f7 45-256 DIVISION SIGN
114
115 # Misc unicode characters
116 include da-dk-6miscChars.cti
117
118 # Litdigits
119 include litdigits6Dots.uti
120 midendnumericmodechars /,.:^
121 undefined 26
122
123 ### Braille indicators and special characters
124
125 #hyphen - 36
126
127 letsign 56
128
129 # No letsign before normal letters or letters with accents
130 # Letters with accents are handled by pass2.
131 noletsign ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅÀÄÈÉÖÜ\x0152
132 noletsign abcdefghijklmnopqrstuvwxyzæøåàäèéöü\x00df\x0149\x0153
133
134 # Emphasis opcodes
135 emphclass italic
136 emphclass underline
137 emphclass bold
138
139 begemphphrase italic 46
140 endemphphrase italic after 46
141
142 begemphphrase bold 46
143 endemphphrase bold after 46
144
145 begemphphrase underline 46
146 endemphphrase underline after 46
147
148 capsletter 6
149 begcapsword 456
150 endcapsword 56
151 multind 56-6 letsign capsletter
152 multind 6-56 capsletter letsign
153 multind 46-456 letsign begcapsword
154
155 numsign 3456
156 multind 56-3456 letsign numsign
157
158 #class of none-space characters that demand double dashes
159 # Used in context lines later.
160 #must be the first class defined.
161 attribute charsWDoubleDash .,?!/:"'() # class w
162
163 ### Correct - forward translation
164
165 # Chars that don't require a space before percent and permille:
166 attribute charsBeforePercent "(\x201e\x0084\x201c\x0093\x201d\x0094\x00ab\x00bb #class x
167 noback correct `["%"] *
168 noback correct !$sx["%"] "\s%"
169 noback correct `["\x2030"] *
170 noback correct !$sx["\x2030"] "\s\x2030"
171 noback correct `["\x0089"] *
172 noback correct !$sx["\x0089"] "\s\x2030"
173
174 # Chars to be treated like digits when switching back to letter mode
175 attribute extraDigits \x00bc\x00bd\x00be
176
177 #Use the "correct" opcode to convert chars that can't be back-translated
178 # and make the table more simple.
179
180 # Dashes
181 attribute dashes \x2013\x2014\x0096\x0097\x00ad
182 noback correct %dashes "-"
183
184 attribute quotes \x201e\x0084\x201c\x0093\x201d\x0094\x00ab\x00bb
185 noback correct %quotes "\""
186
187 attribute apostrophes `\x201a\x0082\x2039\x008b\x2018\x0091\x2019\x0092\x203a\x009b\x00b4
188 noback correct %apostrophes "'"
189
190 ### Correct - backward translation
191
192 # characters that may get mangled by the insertion of extra letsigns
193 nofor correct "\x2818" "~"
194 #nofor correct "\x282f" "&"
195 #nofor correct "\x2814" "*"
196
197 nofor correct "\x28a0" ? # Extraneous endcaps signs
198 #nofor correct "\x2820" ?
199 nofor correct "~\\456/" "|"
200
201 ### Pass 1 - Forward and backward
202
203 # Punctuations, math and numbers
204 #midnum , 2
205 #midnum . 3
206 #midnum - 36
207 endnum - 36
208 #midnum / 34
209 #midnum : 25
210
211 midnum ^ 45-346
212 midnum \x00d7 45-35
213
214 # Remove space between § and numbers.
215 noback begnum § 346
216 begnum §\s 346
217 begnum §§\s 346-346
218 always §§ 346-346
219
220 # Punctuation
221 prepunc " 2356
222 postpunc " 2356
223 prepunc - 36
224 postpunc - 36
225 nofor always \s-\s 0-36-36-0
226 always :- 25-36
227 always ;- 23-36
228 always --- 36-36-36
229 always ---- 36-36-36-36
230 always ----- 36-36-36-36-36
231
232 # these characters must be separated from ")" by a letsign.
233 attribute SepToRightpar Jj%\x2030\x0089\x201a\x0082\x2039\x009b\x2018\x0091\x2019\x0092\x203a\x009b
234 after SepToRightpar always ) 56-356
235
236 prepunc ( 236
237 postpunc ) 356
238
239 always .) 3-356
240 always ... 3-3-3
241
242 always !! 235-235
243 always !!! 235-235-235
244 always !!!! 235-235-235-235
245 always !!!!! 235-235-235-235-235
246
247 ### Context rules - forward translation
248
249 # Ensure two dashes where appropriate.
250 noback context $w["-"]$w @36
251 noback context $sw["-"]$sw @36-36
252 noback context `["-"]$sw @36-36
253 noback context $sw["-"]~ @36-36
254 noback context !$sw["-"]~ @36
255 noback context `["-"]~ @36-36
256
257 #ensure letsign between a digit and a letter
258 noback context $dy[]$u @56
259 noback context $dy$Spm.[]$u @56
260
261 ### context - backward translation
262
263 # Ensure the correct number of dashes
264 nofor context @36[@36-36] "--"
265 nofor context [@36-36]@36 "--"
266 nofor context $w[@36-36]$w "--"
267 nofor context $sw[@36-36]$sw "-"
268 nofor context `[@36-36]$sw "-"
269 nofor context $sw[@36-36]~ "-"
270 nofor context `@36-36~ "-"
271
272
273 ### Pass 2 - forward translation
274
275 noback pass2 @56-5 @5 # no letsign before letters with accent
276 noback pass2 @56-6-5 @6-5 # no letsign before cap letters with accent
277 noback pass2 @56-6 @6-56 # Ensure correct order
278
279 ### Pass 2 - backward
280
281 ### Pass 3 - forward translation
282
283 # Ensure there is only one letsign
284 noback pass3 @56-56 @56
285
286 # Ensure there is only one emphasis sign
287 noback pass3 @46-46 @46
288 noback pass3 @46-46-46 @46
289