-
-
Notifications
You must be signed in to change notification settings - Fork 205
/
en-ueb-g2.ctb
618 lines (572 loc) · 17.5 KB
/
en-ueb-g2.ctb
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
# liblouis: Unified English Braille Code (Grade 2)
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the Lesser or Library GNU General Public License
# as published by the
# Free Software Foundation; either version 3, or (at your option) any
# later version.
#
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# Library GNU General Public License for more details.
#
# You should have received a copy of the Library GNU General Public
# License along with this program; see the file COPYING. If not, write
# to
# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
# Derived from United States English grade 2 braille code (literary code version).
# Contributors: John J. Boyer (U.S. grade 2 and libLouis), Mesar Hameed (code, harness and rule book references), Joseph Lee (testing and general table layout) and others.
include braille-patterns.cti
include en-ueb-g1.ctb
# As in grade 1 (en-ueb-g1), g2 specific rules are organized according to rule sections (with exceptions throughout this table).
# Unless specified, the translations always comes first before exceptions, with noteworthy exceptions placed at the very end of the entries.
### UEB rulebook section 10.1, Alphabetic word signs
# Use the alphabetic wordsign when the word it represents is "standing
# alone".
word but 12
word can 14
word do 145
word every 15
word from 124
word go 1245
word have 125
word just 245
word knowledge 13
word like 123
word more 134
word not 1345
word people 1234
word quite 12345
word rather 1235
word so 234
endword 's 3-234
word that 2345
word us 136
word very 1236
word it 1346
word you 13456
word as 1356
word will 2456
### ueb rulebook, 10.1.2
# Use the alphabetic wordsign when the word it represents is followed
# by an apostrophe with the following letters: d, ll, re, s, t, ve,
# provided the resulting word is standing alone.
#
# [note] [todo]: the list below was automatically generated, and may not form valid words, but they do
# follow the rules.
# We should probably carefully go through and remove those that are not valid words.
word but'd 12-3-145
word but'll 12-3-123-123
word but're 12-3-1235-15
word but's 12-3-234
word but't 12-3-2345
word but've 12-3-1236-15
word can'd 14-3-145
word can'll 14-3-123-123
word can're 14-3-1235-15
word can's 14-3-234
word can't 14-3-2345
word can've 14-3-1236-15
word do'd 145-3-145
word do'll 145-3-123-123
word do're 145-3-1235-15
word do's 145-3-234
word do't 145-3-2345
word do've 145-3-1236-15
word every'd 15-3-145
word every'll 15-3-123-123
word every're 15-3-1235-15
word every's 15-3-234
word every't 15-3-2345
word every've 15-3-1236-15
word from'd 124-3-145
word from'll 124-3-123-123
word from're 124-3-1235-15
word from's 124-3-234
word from't 124-3-2345
word from've 124-3-1236-15
word go'd 1245-3-145
word go'll 1245-3-123-123
word go're 1245-3-1235-15
word go's 1245-3-234
word go't 1245-3-2345
word go've 1245-3-1236-15
word have'd 125-3-145
word have'll 125-3-123-123
word have're 125-3-1235-15
word have's 125-3-234
word have't 125-3-2345
word have've 125-3-1236-15
word just'd 245-3-145
word just'll 245-3-123-123
word just're 245-3-1235-15
word just's 245-3-234
word just't 245-3-2345
word just've 245-3-1236-15
word knowledge'd 13-3-145
word knowledge'll 13-3-123-123
word knowledge're 13-3-1235-15
word knowledge's 13-3-234
word knowledge't 13-3-2345
word knowledge've 13-3-1236-15
word like'd 123-3-145
word like'll 123-3-123-123
word like're 123-3-1235-15
word like's 123-3-234
word like't 123-3-2345
word like've 123-3-1236-15
word more'd 134-3-145
word more'll 134-3-123-123
word more're 134-3-1235-15
word more's 134-3-234
word more't 134-3-2345
word more've 134-3-1236-15
word not'd 1345-3-145
word not'll 1345-3-123-123
word not're 1345-3-1235-15
word not's 1345-3-234
word not't 1345-3-2345
word not've 1345-3-1236-15
word people'd 1234-3-145
word people'll 1234-3-123-123
word people're 1234-3-1235-15
word people's 1234-3-234
word people't 1234-3-2345
word people've 1234-3-1236-15
word quite'd 12345-3-145
word quite'll 12345-3-123-123
word quite're 12345-3-1235-15
word quite's 12345-3-234
word quite't 12345-3-2345
word quite've 12345-3-1236-15
word rather'd 1235-3-145
word rather'll 1235-3-123-123
word rather're 1235-3-1235-15
word rather's 1235-3-234
word rather't 1235-3-2345
word rather've 1235-3-1236-15
word so'd 234-3-145
word so'll 234-3-123-123
word so're 234-3-1235-15
word so's 234-3-234
word so't 234-3-2345
word so've 234-3-1236-15
word that'd 2345-3-145
word that'll 2345-3-123-123
word that're 2345-3-1235-15
word that's 2345-3-234
word that't 2345-3-2345
word that've 2345-3-1236-15
word us'd 136-3-145
word us'll 136-3-123-123
word us're 136-3-1235-15
word us's 136-3-234
word us't 136-3-2345
word us've 136-3-1236-15
word very'd 1236-3-145
word very'll 1236-3-123-123
word very're 1236-3-1235-15
word very's 1236-3-234
word very't 1236-3-2345
word very've 1236-3-1236-15
word it'd 1346-3-145
word it'll 1346-3-123-123
word it're 1346-3-1235-15
word it's 1346-3-234
word it't 1346-3-2345
word it've 1346-3-1236-15
word you'd 13456-3-145
word you'll 13456-3-123-123
word you're 13456-3-1235-15
word you's 13456-3-234
word you't 13456-3-2345
word you've 13456-3-1236-15
word as'd 1356-3-145
word as'll 1356-3-123-123
word as're 1356-3-1235-15
word as's 1356-3-234
word as't 1356-3-2345
word as've 1356-3-1236-15
word will'd 2456-3-145
word will'll 2456-3-123-123
word will're 2456-3-1235-15
word will's 2456-3-234
word will't 2456-3-2345
word will've 2456-3-1236-15
# JL: Majority are not words - weed them out please. Also, see below for a suggestion to use word groups.
### UEB rulebook section 10.2, strong wordsigns
# Use the strong wordsign when the word it represents is "standing alone.
word child 16
word shall 146
word this 1456
word which 156
word out 1256
word still 34
### UEB rulebook section 10.2.2
# Use the strong wordsign when the word it represents is followed by
# an apostrophe with the following letters: d, ll, re, s, t, ve,
# provided that the resulting word is standing alone.
#
# [note] [todo]: the list below was automatically generated, and may not form valid words, but they do
# follow the rules.
# We should probably carefully go through and remove those that are not valid words.
# JL: Perhaps let's come up with a stronger class opcode or an word array opcode to group these once, then apply only the letters after apostrophes.
# Example: wordarray strongWords {"child", "still", ...}
# after strongWords 'll = # Instead of writing 'll for each word, the words are grouped, so only one entry is needed.
# May need some code changes under the hood, as current class opcode only works with chars (up to 512 chars, not optimized for word groups). This may also help us with optimizing some dictionary-based tables such as en-us-g2.
word child'd 16-3-145
word child'll 16-3-123-123
word child're 16-3-1235-15
word child's 16-3-234
word child't 16-3-2345
word child've 16-3-1236-15
word shall'd 146-3-145
word shall'll 146-3-123-123
word shall're 146-3-1235-15
word shall's 146-3-234
word shall't 146-3-2345
word shall've 146-3-1236-15
word this'd 1456-3-145
word this'll 1456-3-123-123
word this're 1456-3-1235-15
word this's 1456-3-234
word this't 1456-3-2345
word this've 1456-3-1236-15
word which'd 156-3-145
word which'll 156-3-123-123
word which're 156-3-1235-15
word which's 156-3-234
word which't 156-3-2345
word which've 156-3-1236-15
word out'd 1256-3-145
word out'll 1256-3-123-123
word out're 1256-3-1235-15
word out's 1256-3-234
word out't 1256-3-2345
word out've 1256-3-1236-15
word still'd 34-3-145
word still'll 34-3-123-123
word still're 34-3-1235-15
word still's 34-3-234
word still't 34-3-2345
word still've 34-3-1236-15
### UEB rulebook section 10.3, strong contractions
# Use the strong contraction wherever the letters it represents occur
# unless other rules limit its use.
#
# [note] [todo]: need to add the exceptions to the test harness, remove this todo when done.
word and 12346
partword and 12346
word for 123456
partword for 123456
word of 12356
partword of 12356
word the 2346
partword the 2346
word with 23456
partword with 23456
### UEB rulebook section 10.4, strong groupsigns
# Use the strong groupsign wherever the letters it represents occur
# unless other rules limit its use.
#
# [note] [todo]: need to add the exceptions to the test harness, remove this todo when done.
partword ch 16
partword gh 126
partword sh 146
partword th 1456
partword wh 156
partword ed 1246
partword er 12456
partword ou 1256
partword ow 246
partword st 34
# "ing" 346, see 10.4.3.
partword ar 345
### UEB rulebook section 10.4.2
# When the use of a strong groupsign for
# "ch", "sh", "th", "wh", "ou" or "st"
# would be misread as a word, braille the letters individually.
#
# [note] [todo]: our use of partword should guard against this from happening.
# but just incase it doesn't we might need add a list of exception words or find another pattern.
# [todo]: add the examples to test harness.
### UEB rulebook section 10.4.3
# Use the strong groupsign for "ing" wherever the letters it represents occur except at the
# beginning of a word.
midendword ing 346
### UEB rulebook section 10.5 Lower wordsigns
lowword be 23
lowword enough 26
lowword were 2356
lowword his 236
lowword in 35
lowword was 356
### UEB rulebook section 10.5.2 Lower wordsigns, enough's
# [note]: this might actually not be correct, and might match more than what is needed.
# example: "bla bla enough's."
# [todo]: testcase needed.
word enough's 26-3-234
### UEB rulebook section 10.6 lower groupsigns.
#
# complicated, doesn't fit easely with liblouis existing opcodes. will come back to this.
# JL: Basic signs from 10.6.1 and exceptions listed in 10.6:
#be
begword be 23 become, being, etc.
syllable ben 12-26 # For catching some odd exceptions such as benefit.
#con
begword con 25 connect, congradulate, etc. This has an interesting effect in one of the shortforms (conceive/conceiving to be exact).
#dis
begword dis 256 # Not to be confused with dot sign.
#ea
midword ea 2
midword eabil = interchangeability
endword eably = noticeably
midendword eage = mileage
midendword eager 2-1245-12456 meager
always eally 15-6-13456
midendword eance 15-46-15 vengeance
midendword eand 15-12346 meander
always ear 15-345
sufword great 1245-1235-2345
syllable head 125-2-145
syllable heart 125-15-345-2345
#end ea
#bb
midword bb 23
syllable rubber 1235-136-23-12456 indiarubber
#end bb
#cc
midword cc 25
#ff
midword ff 235
syllable ffold 235-135-123-145 scaffold
always ffor 124-123456 afford
sufword geoff 1245-15-12356-124 Geoffrey
begword proff 1234-1235-12356-124 proffer
#end ff
#gg
midword gg 2356
begword begg 12-15-2356
begword reagg 1235-15-1-2356 reaggregated
always bedragg 23-145-1235-1-2356
always doggone 145-135-1245-1245-5-135
#end gg
#in
midendword iness 24-56-234 business
#### UEB rulebook section 10.6.9 lower groupsigns, special case for en
# Special case for when en is standing alone (word by itself).
partword en 26 general
word en = # To avoid confusion with enough.
### UEB rulebook section 10.7 Initial-letter contractions
# Usually appears anywhere in a word (special cases exists). Due to how LibLouis looks up table entries, some entries have exceptions before the actual entry.
# Most entries have two parts: the word entry (when the word is by itself) and when the contraction is within a word (partword).
# To handle some entries such as "day", define a conscenant and a vowel class:
class vowel aeiou # Used in some cases.
class conscenant BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz # For certain entries such as "upon"..
# dots 45
after conscenant midendword upon = # dupont
partword upon 56-136 hereupon, upon, etc.
prfword these 45-2346 (special cases exists)
sufword those 45-1456
word whose 45-156
word word 45-2456 Foreword
partword word 45-2456 Foreword
# dots 456
word cannot 456-14
word had 456-125 Galahad (special cases exists).
partword had 456-125 Galahad (special cases exists).
word many 456-134 Germany
partword many 456-134 Germany
word spirit 456-234
partword spirit 456-234
sufword their 456-2346
word world 456-2456
partword world 456-2456
# dot 5
before vowel sufword day = dayan
word day 5-145 yesterday, Dayton, etc.
partword day 5-145 yesterday, Dayton, etc.
word today 2345-145
word ever 5-15
partword ever 5-15 Everest (special cases exists)
word father 5-124
partword father 5-124
word here 5-125
partword here 5-125
word lord 5-123
partword lord 5-123
word mother 5-134
partword mother 5-134
word name 5-1345
partword name 5-1345
word one 5-135
partword one 5-135
word part 5-1234
partword part 5-1234
word question 5-12345
partword question 5-12345
word right 5-1235
partword right 5-1235
word some 5-234
partword some 5-234
word time 5-2345
partword time 5-2345
word under 5-136
partword under 5-136
word young 5-13456
partword young 5-13456
sufword there 5-2346
sufword character 5-16
word through 5-1456
partword through 5-1456
word where 5-156
partword where 5-156
word wherever 156-12456-5-15 # A notable exception.
word ought 5-1256
partword ought 5-1256
word work 5-2456
partword work 5-2456
partword dow = # For some words.
### UEB rulebook section 10.8 Final-letter groupsigns
# Partwords/midendwords with two cell signs (use below translations unless special cases are defined elsewhere)
# dots 46:
midendword ound 46-145 round, grounded, etc.
midendword ance 46-15 Advance, Chance, cancel, etc.
midendword sion 46-1345 vision, provisional, etc.
midendword less 46-234 Bless, Restless, etc.
midendword ount 46-2345 count, amount, mountain, etc.
# Dots 56:
midendword ence 56-15 Sentence, hence, etc.
midendword ong 56-1245 strong, wronged, etc.
midendword ful 56-123 Fruitful, joyfully, etc.
midendword tion 56-1345 tradition, international, etc. Excludes ation, which has been depricated.
midendword ness 56-234 Witness (see UEB g2 exceptions list for special cases).
midendword ment 56-2345 Moment, augmented, etc.
midendword ity 56-13456 city (see the UeB g2 exceptions list for special cases).
# Todo: Create an exceptions table and insert the filename here for ease of maintainability.
### UEB Rulebook 10.9 Shortforms and accompanying special cases and exceptions
# The shortforms can be translated as a word or beginning of a word (hence two entries for most of these) with special cases and exceptions.
# Universal case (works everywhere):
# Contractions beginning with the letter a
largesign a 1
largesign A 1
always aar 1-345 Aaron
always aa 1-1 back-translation: maasai
word about 1-12
word thereabouts 5-2346-1-12-234
word runabout 1235-136-1345-1-12
contraction ab
sufword above 1-12-1236
contraction abv
word according 1-14
contraction ac
word accordingly 1-14-123-13456
contraction acly
word across 1-14-1235
contraction acr
always aed =
always aer = Rosenlaer
#af rule and word exceptions
word after 1-124
begword aforem 1-123456-15-134 aforementioned
word aforesaid 1-123456-15-234-145
always afr 1-124-1235
always africa 1-124-1235-24-14-1
begword aforem 1-123456-15-134 aforementioned
word aforesaid 1-123456-15-234-145
always afr 1-124-1235
always africa 1-124-1235-24-14-1
always fafnir 124-1-124-1345-25-1235 fafnirs
always hafnium 124-1-124-1345-25-136-134 hafniums
contraction af
word afternoon 1-124-1345
word afternoons 1-124-1345-234
word afternoon's 1-124-1345-3-234
contraction afn
sufword afterward 1-124-2456
always hereafter 5-125-1-124
sufword rafter 1235-1-124-2345-12456
always thereafter 5-2346-1-124
begword aftere 1-124-2345-12456-15 aftereffect
begword afteri 1-124-2345-12456-24 afterimage
begword reaffor 1235-15-1-125-123456 reafforestation
begword reaff 1235-15-1-235
contraction afw
#end af rule and word exceptions
contraction ag
word against 1-1245-34
always agery =
contraction agst
word almost 1-123-134
contraction alm
word already 1-123-1235
contraction alr
word also 1-123
contraction al
word although 1-123-1456
word altogether 1-123-2345
contraction alt
word always 1-123-2456
contraction alw
word because 23-14
sufword before 23-124
sufword behind 23-125
sufword below 23-123
sufword beneath 23-1345
sufword beside 23-234
sufword between 23-2345
sufword beyond 23-13456
word blind 12-123
contraction bl
begword blindf 12-123-124 blindfold
word blindly 12-123-123-13456
word blindness 12-123-56-234
sufword blinds 12-123-234 blindsided
partword braille 12-1235-123
partword children 16-1345
word either 15-24
contraction ei
word herself 125-12456-124
word him 125-134
contraction hm
word himself 125-134-124
contraction hmf
word its 1346-234
word itself 1346-124
word must 134-34
word myself 134-13456-124
word neither 1345-15-24
word oneself 5-135-124
word said 234-145
word such 234-16
word themselves 2346-134-1236-234
word you 13456
word your 13456-1235
word yours 13456-1235-234
word yourself 13456-1235-124
word yourselves 13456-1235-1236-234
# Exception 1: do not translate the following shortforms with s or 's added:
word abouts =
word almosts =
word hims =
# Tweak: Deal with "ceive" and "ceiving" words once.
midendword ceive 14-1236 # All cases (conceive, receive, etc.)
endword ceiving 14-1236-1245 # All cases (perceiving, deceiving, etc.).
# Exceptions to the above tweak:
partword deceive 145-14-1236
prfword deceiving 145-14-1236-1245
partword receive 1235-14-1236
prfword receiving 1235-14-1236-1245
### end ###
### [todo]: the words below should be moved into their own sections, they dont belong here.
# Possibly under 10.9 (shortforms) and others.
### [todo] these opcodes should be moved into their matching ueb rulebook section.
#
# Braille indicators specific to Grade 2
letsign 56
noletsignafter .
noletsignafter '
multind 56-6 letsign capsign
capsign 6