Debian Codegraph @

tables/th-g0.utb

raw
1 # liblouis: Thai Current Braille System.
2 #
3 #-index-name: Thai, uncontracted
4 #-display-name: Thai uncontracted braille
5 #
6 #+language: th
7 #+type: literary
8 #+system: thai
9 #+contraction: no
10 #+grade: 0
11 #+dots: 6
12 #
13 # This table can handle 8-dot braille input in backward mode, but not 6-dot braille
14 #+direction: forward
15 #
16 #-copyright: 2023, Thai braille fund and FOUNDATION FOR THE BLIND IN THAILAND UNDER THE ROYAL PATRONAGE OF H.M. THE QUEEN.
17 #
18 # Copyright (C) 2023 by Thai braille fund and FOUNDATION FOR THE BLIND IN THAILAND UNDER THE ROYAL PATRONAGE OF H.M. THE QUEEN.
19 #
20 # Version 2023-06-01
21 #
22 # This file is part of liblouis.
23 #
24 # liblouis is free software: you can redistribute it and/or modify it
25 # under the terms of the GNU Lesser General Public License as
26 # published by the Free Software Foundation, either version 2.1 of the
27 # License, or (at your option) any later version.
28 #
29 # liblouis is distributed in the hope that it will be useful, but
30 # WITHOUT ANY WARRANTY; without even the implied warranty of
31 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
32 # Lesser General Public License for more details.
33 #
34 # You should have received a copy of the GNU Lesser General Public
35 # License along with liblouis. If not, see
36 # <http://www.gnu.org/licenses/>.
37 #
38 # Created and maintained by: Chatupol Nootatong <[email protected]>
39 # - Dr.Wiraman Niyomphol <[email protected]>
40 # - Itsawat Banlawanich <[email protected]>
41 # Based on <https://www.tab.or.th/braille_spec/thaibraille.pdf>
42 #
43 #-maintainer: Chatupol Nootatong <[email protected]>
44 #-author: Chatupol Nootatong <[email protected]>
45 #-author: Dr. Wiraman Niyomphol <[email protected]>
46 #-author: Itsawat Banlawanich <[email protected]>
47
48 include en-ueb-g1.ctb
49
50 include spaces.uti
51
52 # Thai Consinants
53 letter \x0e01 1245 # ก
54 letter \x0e02 13 # ข
55 letter \x0e03 356-13 # ฃ
56 letter \x0e04 136 # ค
57 letter \x0e05 36-136 # ฅ
58 letter \x0e06 6-136 # ฆ
59 letter \x0e07 12456 # ง
60 letter \x0e08 245 # จ
61 letter \x0e09 34 # ฉ
62 letter \x0e0a 346 # ช
63 letter \x0e0b 2346 # ซ
64 letter \x0e0c 6-346 # ฌ
65 letter \x0e0d 6-13456 # ญ
66 letter \x0e0e 6-145 # ฎ
67 letter \x0e0f 6-1256 # ฏ
68 letter \x0e10 6-2345 # ฐ
69 letter \x0e11 6-23456 # ฑ
70 letter \x0e12 36-23456 # ฒ
71 letter \x0e13 6-1345 # ณ
72 letter \x0e14 145 # ด
73 letter \x0e15 1256 # ต
74 letter \x0e16 2345 # ถ
75 letter \x0e17 23456 # ท
76 letter \x0e18 356-23456 # ธ
77 letter \x0e19 1345 # น
78 letter \x0e1a 1236 # บ
79 letter \x0e1b 12346 # ป
80 letter \x0e1c 1234 # ผ
81 letter \x0e1d 1346 # ฝ
82 letter \x0e1e 1456 # พ
83 letter \x0e1f 1246 # ฟ
84 letter \x0e20 6-1456 # ภ
85 letter \x0e21 134 # ม
86 letter \x0e22 13456 # ย
87 letter \x0e23 1235 # ร
88 letter \x0e25 123 # ล
89 letter \x0e27 2456 # ว
90 letter \x0e28 6-234 # ศ
91 letter \x0e29 36-234 # ษ
92 letter \x0e2a 234 # ส
93 letter \x0e2b 125 # ห
94 letter \x0e2c 6-123 # ฬ
95 letter \x0e2d 135 # อ
96 letter \x0e2e 123456 # ฮ
97
98 # Thai vowel
99 letter \x0e30 1 # ะ
100 letter \x0e31 345 # ั
101 letter \x0e47 3 # ็
102 letter \x0e32 16 # า
103 letter \x0e34 12 # ิ
104 letter \x0e35 23 # ี
105 letter \x0e38 14 # ุ
106 letter \x0e39 25 # ู
107 letter \x0e36 246 # ึ
108 letter \x0e37 26 # ื
109 letter \x0e40 124 # เ
110 letter \x0e41 126 # แ
111 letter \x0e42 24 # โ
112 letter \x0e33 1356 # ำ
113 letter \x0e44 156 # ไ
114 letter \x0e43 156-2 # ใ
115 letter \x0e24 1235-2 # ฤ
116 letter \x0e26 123-2 # ฦ
117 letter \x0e48 35 # ่
118 letter \x0e49 256 # ้
119 letter \x0e4a 2356 # ๊
120 letter \x0e4b 236 # ๋
121 sign \x0e46 2 # ๆ
122 letter \x0e4c 356 # ์
123 sign \x0e4d 5 # ํ
124 sign \x0e3a 3 # ฺ
125 sign \x0e2f 56-23 # ฯ
126 sign \x0e3f 4-12 # ฿
127 sign \x0e45 5-16 # ๅ
128 sign \x0e4e 4-15 # ๎
129 sign \x0e4f 4-14 # ๏
130 sign \x0e5a 4-256 # ๚
131 sign \x0e5b 4-23 # ๛
132
133 # make phayan yai
134 noback pass2 @56-23-123-56-23 @56-123
135
136 # Thai digit
137 digit \x0e50 245b # ๐
138 digit \x0e51 1b # ๑
139 digit \x0e52 12b # ๒
140 digit \x0e53 14b # ๓
141 digit \x0e54 145b # ๔
142 digit \x0e55 15b # ๕
143 digit \x0e56 124b # ๖
144 digit \x0e57 1245b # ๗
145 digit \x0e58 125b # ๘
146 digit \x0e59 24b # ๙
147
148 #english character
149 attribute englishcharacter abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
150
151 #attribute Thai Consinants
152 attribute thaiconsinants \x0e01\x0e02\x0e03\x0e04\x0e05\x0e06\x0e07\x0e08\x0e09\x0e0a\x0e0b\x0e0c\x0e0d\x0e0e\x0e0f\x0e10\x0e11\x0e12\x0e13\x0e14\x0e15\x0e16\x0e17\x0e18\x0e19\x0e1a\x0e1b\x0e1c\x0e1d\x0e1e\x0e1f\x0e20\x0e21\x0e22\x0e23\x0e25\x0e27\x0e28\x0e29\x0e2a\x0e2b\x0e2c\x0e2d\x0e2e
153
154 #attribute ThaiDigit
155 attribute thaidigit \x0e50\x0e51\x0e52\x0e53\x0e54\x0e55\x0e56\x0e57\x0e58\x0e59
156
157 # Add a dot 6 before the number sign. When detecting a character as a Thai number
158 noback pass2 @3456%thaidigit @6*
159
160 # If 3 or more consecutive . marks are found, change to dot 6.
161 noback context "..." @6-6-6#1=1
162 noback context #1=1"." @6
163 noback context #1=1 #1=0
164
165 # Remove the virtual dots from the Thai Digit.
166 noback pass3 @245b @245
167 noback pass3 @1b @1
168 noback pass3 @12b @12
169 noback pass3 @14b @14
170 noback pass3 @145b @145
171 noback pass3 @15b @15
172 noback pass3 @124b @124
173 noback pass3 @1245b @1245
174 noback pass3 @125b @125
175 noback pass3 @24b @24
176
177 include th-comp8-backward.utb