diff --git a/.github/workflows/fuzzing.yml b/.github/workflows/fuzzing.yml index 2fb5a7f9ae..639108eb22 100644 --- a/.github/workflows/fuzzing.yml +++ b/.github/workflows/fuzzing.yml @@ -60,8 +60,7 @@ jobs: matrix: ucs: [ucs2] # ucs4 - table: [ afr-za-g1.ctb, afr-za-g2.ctb, ar-ar-comp8.utb, ar-ar-g1.utb, ar-ar-g2.ctb, as-in-g1.utb, aw-in-g1.utb, ba.utb, be-in-g1.utb, bel.utb, bel-comp.utb, bg.ctb, bg.utb, bh.ctb, bo.ctb, boxes.ctb, br-in-g1.utb, ca-g1.ctb, chr-us-g1.ctb, ckb-g1.ctb, cop-eg-comp8.utb, cs-comp8.utb, cs-g1.ctb, cy-cy-g1.utb, cy-cy-g2.ctb, da-dk-g08_1993.ctb, da-dk-g08.ctb, da-dk-g16_1993.ctb, da-dk-g16.ctb, da-dk-g16-lit_1993.ctb, da-dk-g18_1993.ctb, da-dk-g18.ctb, da-dk-g26_1993.ctb, da-dk-g26.ctb, da-dk-g26l_1993.ctb, da-dk-g26-lit_1993.ctb, da-dk-g26l-lit_1993.ctb, da-dk-g28_1993.ctb, da-dk-g28.ctb, da-dk-g28l_1993.ctb, de-chess.ctb, de-comp6.utb, de-de-comp8.ctb, de-g0.utb, de-g0-detailed.utb, de-g1.ctb, de-g1-detailed.ctb, de-g2.ctb, de-g2-detailed.ctb, dra.ctb, el.ctb, en_CA.ctb, en-chess.ctb, en-gb-comp8.ctb, en-gb-g1.utb, en-GB-g2.ctb, en-in-g1.ctb, en-nabcc.utb, en-ueb-g1.ctb, en-ueb-g2.ctb, en-ueb-math.ctb, en-us-comp6.ctb, en-us-comp8.ctb, en-us-comp8-ext.utb, en-us-g1.ctb, en-us-g2.ctb, en-us-interline.ctb, en-us-mathtext.ctb, eo-g1.ctb, eo-g1-x-system.ctb, Es-Es-G0.utb, es-g1.ctb, es-g2.ctb, et.ctb, et-g0.utb, ethio-g1.ctb, fa-ir-comp8.ctb, fa-ir-g1.utb, fi-fi-8dot.ctb, fi.utb, fr-bfu-comp6.utb, fr-bfu-comp8.utb, fr-bfu-g2.ctb, ga-g1.utb, ga-g2.ctb, gd.ctb, gon.ctb, grc-international-en.utb, gu-in-g1.utb, haw-us-g1.ctb, he-IL.utb, he-IL-comp8.utb, hi-in-g1.utb, hr-comp8.utb, hr-g1.ctb, hu-hu-comp8.ctb, hu-hu-g1.ctb, hu-hu-g2.ctb, hy.ctb, IPA.utb, is.ctb, it-it-comp6.utb, it-it-comp8.utb, iu-ca-g1.ctb, ja-kantenji.utb, ka.utb, ka-in-g1.utb, kh-in-g1.utb, kk.utb, km-g1.utb, ko-2006-g1.ctb, ko-2006-g2.ctb, ko-g1.ctb, ko-g2.ctb, kok.ctb, kru.ctb, ks-in-g1.utb, lg-ug-g1.utb, lt-6dot.utb, lt.ctb, Lv-Lv-g1.utb, mao-nz-g1.ctb, ml-in-g1.utb, mn-in-g1.utb, mn-MN-g1.utb, mn-MN-g2.ctb, mr-in-g1.utb, ms-my-g2.ctb, mt.ctb, mun.ctb, mwr.ctb, my-g1.utb, my-g2.ctb, ne.ctb, nl-comp8.utb, nl-NL-g0.utb, no-no-8dot-fallback-6dot-g0.utb, no-no-8dot.utb, no-no-comp8.ctb, no-no-g0.utb, no-no-g1.ctb, no-no-g2.ctb, no-no-g3.ctb, no-no-generic.ctb, np-in-g1.utb, nso-za-g1.utb, nso-za-g2.ctb, ny-mw.utb, or-in-g1.utb, pi.ctb, pl-pl-comp8.ctb, Pl-Pl-g1.utb, pt-pt-comp8.ctb, pt-pt-g1.utb, pt-pt-g2.ctb, pu-in-g1.utb, ro.ctb, ro-g0.utb, ru-compbrl.ctb, ru.ctb, ru-litbrl.ctb, ru-litbrl-detailed.utb, ru-ru-g1.ctb, rw-rw-g1.utb, sa-in-g1.utb, sah.utb, se-se.ctb, si-in-g1.utb, sin.utb, sk-g1.ctb, sk-sk-g1.utb, sk-sk.utb, sl-si-comp8.ctb, sl-si-g1.utb, sot-za-g1.ctb, sot-za-g2.ctb, sr-g1.ctb, sv-1989.ctb, sv-1996.ctb, sv-g0.utb, sv-g1.ctb, sv-g2.ctb, sw-ke-g1-2.ctb, sw-ke-g1-3.ctb, sw-ke-g1-4.ctb, sw-ke-g1-5.ctb, sw-ke-g1.utb, sw-ke-g2.ctb, ta.ctb, ta-ta-g1.ctb, te-in-g1.utb, tr.ctb, tr-g1.ctb, tr-g2.ctb, tsn-za-g1.ctb, tsn-za-g2.ctb, tt.utb, uk.utb, uk-comp.utb, unicode-braille.utb, ur-pk-g1.utb, ur-pk-g2.ctb, uz-g1.utb, ve-za-g1.utb, ve-za-g2.ctb, vi-cb8.utb, vi-saigon-g1.ctb, vi-vn-g0.utb, vi-vn-g1.ctb, vi-vn-g2.ctb, xh-za-g1.utb, xh-za-g2.ctb, zh-chn.ctb, zhcn-cbs.ctb, zhcn-g1.ctb, zhcn-g2.ctb, zh-hk.ctb, zh-tw.ctb, zu-za-g1.utb, zu-za-g2.ctb, ] - + table: [ afr-za-g1.ctb, afr-za-g2.ctb, ar-ar-comp8.utb, ar-ar-g1.utb, ar-ar-g2.ctb, as-in-g1.utb, aw-in-g1.utb, ba.utb, be-in-g1.utb, bel.utb, bel-comp.utb, bg.ctb, bg.utb, bh.ctb, bo.ctb, boxes.ctb, br-in-g1.utb, ca-g1.ctb, chr-us-g1.ctb, ckb-g1.ctb, cop-eg-comp8.utb, cs-comp8.utb, cs-g1.ctb, cy-cy-g1.utb, cy-cy-g2.ctb, da-dk-g08_1993.ctb, da-dk-g08.ctb, da-dk-g16_1993.ctb, da-dk-g16.ctb, da-dk-g16-lit_1993.ctb, da-dk-g18_1993.ctb, da-dk-g18.ctb, da-dk-g26_1993.ctb, da-dk-g26.ctb, da-dk-g26l_1993.ctb, da-dk-g26-lit_1993.ctb, da-dk-g26l-lit_1993.ctb, da-dk-g28_1993.ctb, da-dk-g28.ctb, da-dk-g28l_1993.ctb, de-chess.ctb, de-comp6.utb, de-de-comp8.ctb, de-g0.utb, de-g0-detailed.utb, de-g1.ctb, de-g1-detailed.ctb, de-g2.ctb, de-g2-detailed.ctb, dra.ctb, el.ctb, en_CA.ctb, en-chess.ctb, en-gb-comp8.ctb, en-gb-g1.utb, en-GB-g2.ctb, en-in-g1.ctb, en-nabcc.utb, en-ueb-g1.ctb, en-ueb-g2.ctb, en-ueb-math.ctb, en-us-comp6.ctb, en-us-comp8.ctb, en-us-comp8-ext.utb, en-us-g1.ctb, en-us-g2.ctb, en-us-interline.ctb, en-us-mathtext.ctb, eo-g1.ctb, eo-g1-x-system.ctb, Es-Es-G0.utb, es-g1.ctb, es-g2.ctb, et.ctb, et-g0.utb, ethio-g1.ctb, fa-ir-comp8.ctb, fa-ir-g1.utb, fi-fi-8dot.ctb, fi.utb, fr-bfu-comp6.utb, fr-bfu-comp8.utb, fr-bfu-g2.ctb, ga-g1.utb, ga-g2.ctb, gd.ctb, gon.ctb, grc-international-en.utb, gu-in-g1.utb, haw-us-g1.ctb, he-IL.utb, he-IL-comp8.utb, hi-in-g1.utb, hr-comp8.utb, hr-g1.ctb, hu-hu-comp8.ctb, hu-hu-g1.ctb, hu-hu-g2.ctb, hy.ctb, IPA.utb, is.ctb, it-it-comp6.utb, it-it-comp8.utb, iu-ca-g1.ctb, ja-kantenji.utb, ka.utb, ka-in-g1.utb, kh-in-g1.utb, kk.utb, km-g1.utb, ko-2006-g1.ctb, ko-2006-g2.ctb, ko-g1.ctb, ko-g2.ctb, kok.ctb, kru.ctb, ks-in-g1.utb, lg-ug-g1.utb, lt-6dot.utb, lt.ctb, Lv-Lv-g1.utb, mao-nz-g1.ctb, ml-in-g1.utb, mn-in-g1.utb, mn-MN-g1.utb, mn-MN-g2.ctb, mr-in-g1.utb, ms-my-g2.ctb, mt.ctb, mun.ctb, mwr.ctb, my-g1.utb, my-g2.ctb, ne.ctb, nl-comp8.utb, nl-NL-g0.utb, no-no-8dot-fallback-6dot-g0.utb, no-no-8dot.utb, no-no-comp8.ctb, no-no-g0.utb, no-no-g1.ctb, no-no-g2.ctb, no-no-g3.ctb, no-no-generic.ctb, np-in-g1.utb, nso-za-g1.utb, nso-za-g2.ctb, ny-mw.utb, or-in-g1.utb, pi.ctb, pl-pl-comp8.ctb, Pl-Pl-g1.utb, pt-pt-comp8.ctb, pt-pt-g1.utb, pt-pt-g2.ctb, pu-in-g1.utb, ro.ctb, ro-g0.utb, ru-compbrl.ctb, ru.ctb, ru-litbrl.ctb, ru-litbrl-detailed.utb, ru-ru-g1.ctb, rw-rw-g1.utb, sa-in-g1.utb, sah.utb, se-se.ctb, si-in-g1.utb, sin.utb, sk-g1.ctb, sk-sk-g1.utb, sk-sk.utb, sl-si-comp8.ctb, sl-si-g1.utb, sot-za-g1.ctb, sot-za-g2.ctb, sr-g1.ctb, sv-1989.ctb, sv-1996.ctb, sv-g0.utb, sv-g1.ctb, sv-g2.ctb, sw-ke-g1-2.ctb, sw-ke-g1-3.ctb, sw-ke-g1-4.ctb, sw-ke-g1-5.ctb, sw-ke-g1.utb, sw-ke-g2.ctb, ta.ctb, ta-ta-g1.ctb, te-in-g1.utb, th-g0.utb, th-comp8-backward.utb, tr.ctb, tr-g1.ctb, tr-g2.ctb, tsn-za-g1.ctb, tsn-za-g2.ctb, tt.utb, uk.utb, uk-comp.utb, unicode-braille.utb, ur-pk-g1.utb, ur-pk-g2.ctb, uz-g1.utb, ve-za-g1.utb, ve-za-g2.ctb, vi-cb8.utb, vi-saigon-g1.ctb, vi-vn-g0.utb, vi-vn-g1.ctb, vi-vn-g2.ctb, xh-za-g1.utb, xh-za-g2.ctb, zh-chn.ctb, zhcn-cbs.ctb, zhcn-g1.ctb, zhcn-g2.ctb, zh-hk.ctb, zh-tw.ctb, zu-za-g1.utb, zu-za-g2.ctb, ] steps: - name: Harden Runner uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1 diff --git a/AUTHORS b/AUTHORS index 4966d89288..c7f628bcde 100644 --- a/AUTHORS +++ b/AUTHORS @@ -115,6 +115,7 @@ TABLE AND TEST CONTRIBUTORS Carles Sadurní Anguita Carlos Ferreira Caterina Avoledo + Chatupol Nootatong Chennai Shankar from Braille Section Team, Anna Centenary Library Christian Waldvogel from SBS Christo de Klerk @@ -148,6 +149,7 @@ TABLE AND TEST CONTRIBUTORS Igor B. Poretsky Ikrami Ahmad International league of Blind Esperantists (LIBE) + Itsawat Banlawanich Jake Kyle from Compass Braille James Datray from Freedom Scientific James Bowden from Royal National Institute of Blind People (RNIB) @@ -220,6 +222,7 @@ TABLE AND TEST CONTRIBUTORS Transkript Tsengel Maidar tsengel@digitalsunngo.org Uğur Gürbüz + Wiraman Niyomphol Yuemei Sun from ViewPlus Technologies, Inc. Zlatko Sobočan Zvonimir Stanecic diff --git a/NEWS b/NEWS index cb83c1c1b8..636fccb420 100644 --- a/NEWS +++ b/NEWS @@ -1,21 +1,49 @@ liblouis NEWS -- history of user-visible changes. -*- org -*- -* Noteworthy changes in release 3.27.0 (2023-09-04) +* Noteworthy changes in release 3.27.0 (2023-09-12) I'd like to thank everybody for helping to bring liblouis forward. For a detailed list of all the changes refer to [[https://github.com/liblouis/liblouis/milestone/37?closed=1][the list of closed issues]]. ** New features +- Added support for Thai computer braille thanks to Chatupol + Nootatong, Dr. Wiraman Niyomphol and Itsawat Banlawanich from Thai + braille fund and Foundation for the Blind in Thailand. +- Added a new Romanian 6 dot table, thanks to BAUM Engineering. ** Bug fixes ** Braille table improvements - Update to Urdu, removing old rule where dots 256 was used for Urdu letters TEH ALEF. Thanks to Jake Kyle. - +- Added the dari character to Bengali thanks to Attila Hammer. +- Improvements to Hungarian (added more exceptions) thanks to Attila + Hammer. +- Improvements to Hungarian to support users if typing physical + braille display, thanks to Attila Hammer. +- Fixed the translation of Unicode ellipses in US English grade 1 and + 2 tables thanks to Anthony Tibbs. +- Added some more symbols to the Nemeth character definitions thanks + to Norbert Markus and Attila Hammer. +- Fixed a bug in Danish when back-translating a word contraction + followed by "!", thanks to Bue Vester-Andersen. +- Improved handling of numbers and fixed a couple of whole-word + contraction errors in Swedish braille thanks to Insyn Scandinavia + AB. +- Added the possibility to retain the virtual dots on Dutch braille, + so that it should be possible to distinguish between identical dot + patterns that originate from different input. Thanks to Bert Frees. ** Other changes +- Removed some code smell thanks to Aaron Cannon. +- Duplicate emphasis class definitions now cause a warning, thanks to + Attila Hammer. ** Deprecation notice - None ** Backwards incompatible changes +- The line continuation feature was removed, as it was no longer + needed and caused problems (e.g. [[https://github.com/liblouis/liblouis/issues/239][issue 239]]). The tables that + depended on it were updated. Thanks to Aaron Cannon. +- Invalid attribute names now cause a table compilation error instead + of just a warning. Thanks to Attila Hammer. ** Invisible changes ** New, renamed or removed tables *** New diff --git a/extra/generate-display-names/display-names b/extra/generate-display-names/display-names index ad5108b7cb..0bf9236786 100644 --- a/extra/generate-display-names/display-names +++ b/extra/generate-display-names/display-names @@ -173,6 +173,8 @@ * ../../tables/ta-ta-g1.ctb Tamil Tamil braille * ../../tables/ta.tbl Tamil, computer Tamil computer braille * ../../tables/te.tbl Telugu Telugu braille +* ../../tables/th-comp8-backward.utb Thai, computer Thai computer braille +* ../../tables/th-g0.utb Thai Thai braille * ../../tables/tr.tbl Turkish, computer Turkish computer braille * ../../tables/tr-g2.tbl Turkish Turkish braille * ../../tables/tsn-za-g1.ctb Setswana, uncontracted Setswana uncontracted braille diff --git a/tables/Makefile.am b/tables/Makefile.am index 7c89199033..bfff4db025 100644 --- a/tables/Makefile.am +++ b/tables/Makefile.am @@ -373,6 +373,8 @@ table_files = \ telugu.cti \ te.tbl \ text_nabcc.dis \ + th-g0.utb \ + th-comp8-backward.utb \ tr.ctb \ tr-g1.ctb \ tr-g2.ctb \ diff --git a/tables/sv-g0.utb b/tables/sv-g0.utb index 81db89aa02..5f54e3c623 100644 --- a/tables/sv-g0.utb +++ b/tables/sv-g0.utb @@ -4,7 +4,7 @@ #-index-name: Swedish, uncontracted #-display-name: Swedish uncontracted braille # -# Copyright (C) 2022 Insyn Scandinavia AB +# Copyright (C) 2022-2023 Insyn Scandinavia AB # Copyright (C) 2012 Mesar Hameed # Copyright (C) 2004-2008 ViewPlus Technologies, Inc. www.viewplus.com # Copyright (C) 2004-2006 JJB Software, Inc. www.jjb-software.com @@ -28,9 +28,9 @@ #-maintainer: Insyn Scandinavia AB # # This braille table is based on the following documentation: -# Svenska skrivregler för punktskrift: +# Svenska skrivregler för punktskrift (2009): # https://www.mtm.se/skrivregler/dtb-bm-l1.html -# Kortskrift nivå 1 och 2: +# Kortskrift nivå 1 och 2 (1997): # https://www.mtm.se/contentassets/08089b067f61495da1b035390d7a120e/kortskrift-niva-1-och-2---1997---nytt-manuskript-2016-09-26_v4.pdf # # This file is part of liblouis. @@ -56,10 +56,16 @@ #+contraction: no #+grade: 0 #+dots: 6 -#+direction: forward +#+direction: both + +# Characters not to backtranslate (must be included for braille input to work) +include braille-patterns.cti + +# Character class used for phonetics +attribute Phoneticchars  # Spaces -space \x00a0 a +noback space \x00a0 0 include spaces.uti # Punctuation @@ -70,6 +76,7 @@ punctuation ( 236 punctuation ) 356 punctuation , 2 hyphen - 36 +noback punctuation ­ 36 punctuation . 3 punctuation : 25 punctuation ; 23 @@ -78,18 +85,16 @@ punctuation [ 12356 punctuation ] 23456 punctuation { 6-12356 punctuation } 6-23456 -punctuation « 45-2356 -punctuation » 2356-12 -noback punctuation \x2010 46 -noback punctuation \x2011 46 -punctuation \x2013 36-36 -punctuation \x2018 5 -sign \x2019 5 -punctuation \x201C 56 -punctuation \x201D 56 -punctuation \x201E 56 -punctuation \x201F 56 -punctuation \x2026 3-3-3 +noback punctuation ‐ 36 +noback punctuation ‑ 36 +punctuation – 36-36 +noback punctuation ‘ 5 +noback sign ’ 5 +noback punctuation “ 56 +noback punctuation ” 56 +noback punctuation „ 56 +noback punctuation ‟ 56 +noback punctuation … 3-3-3 # Special signs sign # 45-3456 @@ -99,7 +104,7 @@ sign % 1456 sign ‰ 1456-1456 sign & 12346 sign * 35 -noback sign \x2606 35 +noback sign ☆ 35 sign _ 45-36 sign @ 45-12356 sign ^ 4 @@ -107,47 +112,50 @@ sign \\ 45-34 sign | 456 sign ¢ 45-14 sign £ 45-123 -sign ¤ 45-15 sign ¥ 45-13456 -sign ○ 12456-1245 -sign ∙ 12456-3 +noback sign ○ 12456-1245 sign § 346 sign © 236-14-356 sign ® 236-1235-356 sign ™ 236-2345-134-356 -sign ° 4-356 -sign ² 4-6-126 -sign ³ 4-6-146 -sign ¹ 4-6-16 -sign \x20AC 15-136-1235-135 -noback sign \x25CF 35 +sign ° 12456-1245 noback sign † 45-256 # Math math + 256 +noback math − 36 math / 34 -math < 246-3 +math < 3456-246 math = 2356 -math > 135-2 +math > 3456-135 math ~ 45-25 -math ¼ 3456-1-34-3456-145 -math ½ 3456-1-34-3456-12 -math ¾ 3456-14-34-3456-145 +noback math ¼ 3456-1-34-3456-145 +noback math ½ 3456-1-34-3456-12 +noback math ¾ 3456-14-34-3456-145 math × 12456-1346 -math ÷ 34 +noback math ÷ 1256 +math √ 146 +noback math 〈 6-236 +noback math 〉 6-356 +math 〈 6-236 +math 〉 6-356 +math ∙ 12456-3 +noback math ¹ 346-3456-1 +noback math ² 346-3456-12 +noback math ³ 346-3456-14 # Letters include latinLetterDef6Dots.uti include digits6Dots.uti include litdigits6Dots.uti -base uppercase \x00C0 \x00E0 -lowercase \x00E0 12356 +base uppercase À à +lowercase à 12356 base uppercase Ä ä lowercase ä 345 base uppercase Å å lowercase å 16 -base uppercase \x00C8 \x00E8 -lowercase \x00E8 2346 +base uppercase È è +lowercase è 2346 base uppercase É é lowercase é 123456 base uppercase Ö ö @@ -171,27 +179,26 @@ repeated ___ 45-36-45-36-45-36 always \s--\s 36-36 numericnocontchars abcdefghij midendnumericmodechars .,\x00a0 -midnum \x00a0 3 +noback midnum \x00a0 3 nonumsign 156 undefined 3678 # Bullets -noback always \x2043 123456 -noback always \xf0b7 123456 -noback always \x2022 123456 -noback always \x25a0 123456 -noback always \x25e6 4-123456 -noback always ▪ 45-123456 +noback sign ● 4-123456 +noback sign ⁃ 4-123456 +noback sign  4-123456 +noback sign • 4-123456 +noback sign ■ 4-123456 +noback sign ◦ 4-123456 +noback sign ▪ 45-123456 # Emojis -noback always \x221a 0 -noback always \xDE0A 25-356 -noback always \xF04A 25-356 -noback always \x263A 25-356 -noback always \xde1d 25-1234 -noback always \x2190 246-25 -noback always \x2192 25-135 -noback always \x2014 36-36 +noback always � 25-356 +noback always ☺ 25-356 +noback always � 25-1234 +noback always ← 246-25 +noback always → 25-135 +noback always — 36-36 # Characters to ignore replace \x0192 @@ -231,8 +238,6 @@ replace \xea98 replace \xeb03 replace \xeb06 replace \xee92 -replace \xf054 -replace \xf059 replace \xf108 replace \xf123 replace \xfffd @@ -242,15 +247,11 @@ replace \xf015 replace \xf105 replace \xf002 replace \xf00a -replace \xf03a -replace \xf067 -replace \xf07a replace \xf15d replace \xf099 replace \xf0d2 replace \xf09a replace \xf1d8 -replace \xf040 replace \xf00c replace \xf058 replace \x200e @@ -259,26 +260,28 @@ replace \x200f replace \xD83D # Diacritic A +base uppercase Æ æ +lowercase æ 4-345 base uppercase Á á -lowercase á 346-35-1 +noback lowercase á 12356 base uppercase Ȁ ȁ -lowercase ȁ 4-1 346-26-26-1 +noback lowercase ȁ 4-1 346-26-26-1 base uppercase Ǟ ǟ lowercase ǟ 346-23-1 base uppercase Ǻ ǻ -lowercase ǻ 4-1 +noback lowercase ǻ 4-1 base uppercase Ǻ ǻ -lowercase ǻ 4-1 +noback lowercase ǻ 4-1 base uppercase Ḁ ḁ -lowercase ḁ 4-1 +noback lowercase ḁ 4-1 base uppercase  â lowercase â 346-235-1 base uppercase Ấ ấ -lowercase ấ 4-1 +noback lowercase ấ 4-1 base uppercase Ầ ầ -lowercase ầ 4-1 +noback lowercase ầ 4-1 base uppercase Ẩ ẩ -lowercase ẩ 4-1 +noback lowercase ẩ 4-1 base uppercase à ã lowercase ã 346-25-1 base uppercase Ǎ ǎ @@ -288,80 +291,88 @@ lowercase ȧ 346-3-1 base uppercase Ạ ạ lowercase ạ 236-3-1 base uppercase Ǡ ǡ -lowercase ǡ 4-1 +noback lowercase ǡ 4-1 base uppercase Ā ā lowercase ā 346-36-1 base uppercase Ă ă -lowercase ă 4-1 +noback lowercase ă 4-1 base uppercase Ȃ ȃ -lowercase ȃ 4-1 +noback lowercase ȃ 4-1 base uppercase Ặ ặ -lowercase ặ 4-1 +noback lowercase ặ 4-1 base uppercase Ả ả -lowercase ả 4-1 -lowercase ẚ 4-1 +noback lowercase ả 4-1 +noback lowercase ẚ 4-1 base uppercase Ą ą -lowercase ą 4-1 +noback lowercase ą 4-1 # Diacritic B -lowercase ᵬ 4-12 +noback lowercase ᵬ 4-12 base uppercase Ḃ ḃ lowercase ḃ 346-3-12 base uppercase Ḅ ḅ lowercase ḅ 126-3-12 base uppercase Ḇ ḇ -lowercase ḇ 4-12 +noback lowercase ḇ 4-12 base uppercase Ƀ ƀ -lowercase ƀ 4-12 +noback lowercase ƀ 4-12 base uppercase Ɓ ɓ -lowercase ɓ 4-12 -lowercase ᶀ 4-12 +noback lowercase ɓ 4-12 +noback lowercase ᶀ 4-12 base uppercase Ƃ ƃ -lowercase ƃ 4-12 +noback lowercase ƃ 4-12 # Diacritic C base uppercase Ć ć lowercase ć 346-35-14 base uppercase Ç ç lowercase ç 126-2-14 base uppercase Ḉ ḉ -lowercase ḉ 4-14 +noback lowercase ḉ 4-14 base uppercase Ĉ ĉ lowercase ĉ 346-235-14 base uppercase Č č -lowercase č 346-2356-14 +lowercase č 146 base uppercase Ċ ċ lowercase ċ 346-3-14 base uppercase Ȼ ȼ -lowercase ȼ 4-14 +noback lowercase ȼ 4-14 base uppercase Ꞓ ꞓ -lowercase ꞓ 4-14 +noback lowercase ꞓ 4-14 # Diacritic D +base uppercase Ḑ ḑ lowercase ḑ 126-2-145 +base uppercase Ḓ ḓ lowercase ḓ 126-235-145 base uppercase Ď ď lowercase ď 346-2356-145 base uppercase Ḋ ḋ lowercase ḋ 346-3-145 lowercase ḍ 126-3-145 -lowercase ḏ 4-145 +noback lowercase ḏ 4-145 base uppercase Đ đ -lowercase đ 4-145 -lowercase ƌ 4-145 -lowercase ȡ 4-145 +noback lowercase đ 1456 +base uppercase Ƌ ƌ +noback lowercase ƌ 4-145 +noback lowercase ȡ 4-145 base uppercase Ɖ ɖ -lowercase ɖ 4-145 +noback lowercase ɖ 4-145 base uppercase ɗ Ɗ -lowercase Ɗ 4-145 +noback lowercase Ɗ 4-145 # Diacritic E +base uppercase Ȅ ȅ lowercase ȅ 346-26-26-15 +base uppercase Ȩ ȩ lowercase ȩ 126-2-15 -lowercase ḝ 4-15 +base uppercase Ḝ ḝ +noback lowercase ḝ 4-15 base uppercase Ë ë lowercase ë 346-23-15 base uppercase Ê ê lowercase ê 346-235-15 +base uppercase Ḙ ḙ lowercase ḙ 126-235-15 base uppercase Ẽ ẽ lowercase ẽ 346-25-15 +base uppercase Ḛ ḛ lowercase ḛ 126-25-15 base uppercase Ě ě lowercase ě 346-2356-15 @@ -372,19 +383,21 @@ lowercase ẹ 126-3-15 base uppercase Ē ē lowercase ē 346-36-15 base uppercase Ḗ ḗ -lowercase ḗ 4-15 +noback lowercase ḗ 4-15 lowercase ḕ 4-15 -lowercase ĕ 4-15 -lowercase ȇ 4-15 +base uppercase Ĕ ĕ +noback lowercase ĕ 4-15 +base uppercase Ȇ ȇ +noback lowercase ȇ 4-15 base uppercase Ę ę -lowercase ę 4-15 +noback lowercase ę 4-15 # Diacritic I base uppercase Í í lowercase í 346-35-24 base uppercase Ì ì lowercase ì 346-26-24 base uppercase Ï ï -lowercase ï 346-23-24 +noback lowercase ï 34 base uppercase Î î lowercase î 346-235-24 base uppercase Ī ī @@ -395,28 +408,39 @@ lowercase ĺ 346-35-123 base uppercase Ḷ ḷ lowercase ḷ 126-3-123 base uppercase Ḹ ḹ -lowercase ḹ 4-123 +noback lowercase ḹ 4-123 # Diacritic M base uppercase ṁ ḿ lowercase ḿ 346-3-134 +base uppercase Ṃ ṃ lowercase ṃ 126-3-134 # Diacritic N +base uppercase Ń ń lowercase ń 346-35-1345 +base uppercase Ǹ ǹ lowercase ǹ 346-26-1345 base uppercase ņ ń lowercase ń 126-2-1345 +base uppercase Ṋ ṋ lowercase ṋ 126-235-1345 base uppercase Ñ ñ lowercase ñ 346-25-1345 +base uppercase Ň ň lowercase ň 346-2356-1345 +base uppercase Ṅ ṅ lowercase ṅ 346-3-1345 +base uppercase Ṇ ṇ lowercase ṇ 126-3-1345 -lowercase ṉ 4-1345 -lowercase ȵ 4-1345 -lowercase ƞ 4-1345 -lowercase ɲ 4-1345 -lowercase ŋ 4-1345 -lowercase ɳ 4-1345 +base uppercase Ṉ ṉ +noback lowercase ṉ 4-1345 +noback lowercase ȵ 4-1345 +base uppercase Ƞ ƞ +noback lowercase ƞ 4-1345 +base uppercase Ɲ ɲ +noback lowercase ɲ 4-1345 +base uppercase Ŋ ŋ +lowercase ŋ 1246 +noback lowercase ɳ 4-1345 # Diacritic O base uppercase Ó ó lowercase ó 346-35-135 @@ -427,29 +451,40 @@ lowercase ô 346-235-135 base uppercase Õ õ lowercase õ 346-25-135 # Diacritic P +base uppercase Ṕ ṕ lowercase ṕ 346-35-1234 +base uppercase Ṗ ṗ lowercase ṗ 346-3-1234 -lowercase ƥ 4-1234 +base uppercase Ƥ ƥ +noback lowercase ƥ 4-1234 # Diacritic Q -lowercase ʠ 4-12345 +noback lowercase ʠ 4-12345 base uppercase Ɋ ɋ -lowercase ɋ 4-12345 +noback lowercase ɋ 4-12345 # Diacritic R +base uppercase Ŕ ŕ lowercase ŕ 346-35-1235 +base uppercase Ȑ ȑ lowercase ȑ 346-26-26-1235 +base uppercase Ṙ ṙ lowercase ṙ 346-3-1235 +base uppercase Ṛ ṛ lowercase ṛ 126-3-1235 -lowercase ṝ 4-1235 -lowercase ṟ 4-1235 +base uppercase Ṝ ṝ +noback lowercase ṝ 4-1235 +base uppercase Ṟ ṟ +noback lowercase ṟ 4-1235 base uppercase Ř ř -lowercase ř 4-1235 -lowercase ȓ 4-1235 -lowercase ɼ 4-1235 -lowercase ɽ 4-1235 -lowercase ɾ 4-1235 +noback lowercase ř 4-1235 +base uppercase Ȓ ȓ +noback lowercase ȓ 4-1235 +noback lowercase ɼ 4-1235 +base uppercase Ɽ ɽ +noback lowercase ɽ 4-1235 +noback lowercase ɾ 4-1235 # Diacritic S base uppercase Š š -lowercase š 156 +noback lowercase š 156 # Diacritic T base uppercase Ţ ţ lowercase ţ 126-2-2345 @@ -461,14 +496,14 @@ lowercase ṫ 346-3-2345 base uppercase Ṭ ṭ lowercase ṭ 126-3-2345 base uppercase Ț ț -lowercase ț 4-2345 +noback lowercase ț 4-2345 base uppercase Ṯ ṯ -lowercase ṯ 4-2345 +noback lowercase ṯ 4-2345 base uppercase Ŧ ŧ -lowercase ŧ 4-2345 +noback lowercase ŧ 1256 base uppercase Ʈ ʈ -lowercase ʈ 4-2345 -lowercase ƫ 4-2345 +noback lowercase ʈ 4-2345 +noback lowercase ƫ 4-2345 # Diacritic U base uppercase Ú ú lowercase ú 346-35-136 @@ -479,8 +514,11 @@ lowercase û 346-235-136 base uppercase Ū ū lowercase ū 346-36-136 # Diacritic W +base uppercase Ẃ ẃ lowercase ẃ 346-35-2456 +base uppercase Ẁ ẁ lowercase ẁ 346-26-2456 +base uppercase Ẅ ẅ lowercase ẅ 346-23-2456 # Diacritic Y base uppercase Ý ý @@ -491,24 +529,104 @@ base uppercase Ÿ ÿ lowercase ÿ 346-23-13456 # Diacritic Ž base uppercase Ž ž -lowercase ž 346-2356-2346 +lowercase ž 2346 # Sami # Other diacritic letters -lowercase ø 4-135 -lowercase œ 4-246 -lowercase ß 4-234 +base uppercase Ø ø +noback lowercase ø 4-135 +base uppercase Œ œ +noback lowercase œ 4-246 +base uppercase ẞ ß +noback lowercase ß 4-234 base uppercase Ð ð -lowercase ð 4-145 -lowercase þ 4-2345 +noback lowercase ð 4-145 +base uppercase Þ þ +noback lowercase þ 4-2345 # Diacritical marks sign ´ 45-35 sign ` 45-26 sign ¸ 45-2 -sign ˆ 45-235 +noback sign ˆ 45-235 +sign ^ 45-235 sign ˇ 45-2356 sign ¨ 45-23 -sign æ 4-345 sign ḝ 45 sign ḝ 45 -# Characters not to backtranslate (must be included for braille input to work) -include braille-patterns.cti +# Phonetics +noback always  256-16 +noback sign  1 +noback sign  235-1 +noback sign  16 +noback sign  235-16 +noback sign  146 +noback sign  346 +noback sign  235-12 +noback sign  14 +noback sign  235-234 +noback sign  256-145 +noback always  145-2346 +noback sign  12456 +noback sign  15 +noback sign  26 +noback sign  345 +noback sign  235-345 +noback always  256-345 +noback sign  1245 +noback sign  235-1245 +noback sign  125 +noback sign  236-125 +noback sign  1346-156 +noback sign  23456 +noback sign  24 +noback sign  34 +noback sign  13 +noback sign  123 +noback sign  256-123 +noback sign  123456 +noback sign  1246 +noback sign  256-1345 +noback sign  135 +noback sign  356-135 +noback sign  1456 +noback sign  1256 +noback sign  246 +noback sign  35-246 +noback always  256-246 +noback sign  126 +noback always  256-126 +noback sign  1234 +noback sign  235-1235 +noback sign  3456 +noback sign  35-1235 +noback sign  234 +noback sign  256-234 +noback sign  156 +noback sign  2345 +noback sign  256-2345 +noback sign  136 +noback sign  356-136 +noback sign  12356 +noback sign  1236 +noback sign  2456 +noback sign  1346 +noback sign  13456 +noback sign  12346 +noback sign  235-13456 +noback sign  1356 +noback sign  2346 +noback sign  134 +noback sign  25 +noback sign  1235 +noback sign  45 +noback sign  12 +noback sign  145 +noback sign  26 +noback sign  1345 +noback sign  124 +noback sign  245 +noback sign  4 +noback punctuation  56-2356 +noback punctuation  56-2356 +noback context [$w]"" @256* # Swap places for these characters +noback context $w[]"(" @6 # Insert dot 6 before parenthesis +noback context $w[]")" @6 # Insert dot 6 before parenthesis diff --git a/tables/sv-g1.ctb b/tables/sv-g1.ctb index b8af284ea0..af92aa431e 100644 --- a/tables/sv-g1.ctb +++ b/tables/sv-g1.ctb @@ -4,9 +4,9 @@ #-index-name: Swedish, partially contracted #-display-name: Swedish partially contracted braille # -# Copyright (C) 2022 Insyn Scandinavia AB +# Copyright (C) 2022-2023 Insyn Scandinavia AB # -#-copyright: 2022, Insyn Scandinavia AB +#-copyright: 2022-2023, Insyn Scandinavia AB # # This braille table is a heavily updated version of the former # Swedish braille table called Se-Se-G1.utb which was quite outdated and @@ -22,9 +22,9 @@ #-maintainer: Insyn Scandinavia AB # # This braille table is based on the following documentation: -# Svenska skrivregler för punktskrift: +# Svenska skrivregler för punktskrift (2009): # https://www.mtm.se/skrivregler/dtb-bm-l1.html -# Kortskrift nivå 1 och 2: +# Kortskrift nivå 1 och 2 (1997): # https://www.mtm.se/contentassets/08089b067f61495da1b035390d7a120e/kortskrift-niva-1-och-2---1997---nytt-manuskript-2016-09-26_v4.pdf # # This file is part of liblouis. @@ -50,12 +50,12 @@ #+contraction: partial #+grade: 1 #+dots: 6 -#+direction: forward +#+direction: both # Load basic Swedish braille table include sv-g0.utb -nocontractsign 56 +nocontractsign 25 # One letter whole-word contractions word att 1 diff --git a/tables/sv-g2.ctb b/tables/sv-g2.ctb index 24d962995b..7bcc594651 100644 --- a/tables/sv-g2.ctb +++ b/tables/sv-g2.ctb @@ -4,9 +4,9 @@ #-index-name: Swedish, contracted #-display-name: Swedish contracted braille # -# Copyright (C) 2022 Insyn Scandinavia AB +# Copyright (C) 2022-2023 Insyn Scandinavia AB # -#-copyright: 2022, Insyn Scandinavia AB +#-copyright: 2022-2023, Insyn Scandinavia AB # # This braille table is a heavily updated version of the former # Swedish braille table called Se-Se-G1.utb which was quite outdated and @@ -22,9 +22,9 @@ #-maintainer: Insyn Scandinavia AB # # This braille table is based on the following documentation: -# Svenska skrivregler för punktskrift: +# Svenska skrivregler för punktskrift (2009): # https://www.mtm.se/skrivregler/dtb-bm-l1.html -# Kortskrift nivå 1 och 2: +# Kortskrift nivå 1 och 2 (1997): # https://www.mtm.se/contentassets/08089b067f61495da1b035390d7a120e/kortskrift-niva-1-och-2---1997---nytt-manuskript-2016-09-26_v4.pdf # # This file is part of liblouis. @@ -50,7 +50,7 @@ #+contraction: full #+grade: 2 #+dots: 6 -#+direction: forward +#+direction: both # Load basic Swedish braille table grade 1 and grade 2 include sv-g1.ctb @@ -92,8 +92,8 @@ word blir 12-1235 contraction br word blev 12-1236 contraction bv -word också 13-234 -contraction ks +word också 14-234 +contraction cs word dess 145-234 contraction ds word dessa 145-234-1 @@ -162,7 +162,7 @@ contraction kn word kunnat 13-1345-2345 contraction knt word kunde 13-1456 -word liksom 123-134 +word liksom 123-234 contraction lm word medan 134-145 contraction md diff --git a/tables/th-comp8-backward.utb b/tables/th-comp8-backward.utb new file mode 100644 index 0000000000..7d8d1371a2 --- /dev/null +++ b/tables/th-comp8-backward.utb @@ -0,0 +1,226 @@ +# liblouis: Thai Current Braille System. +# +#-index-name: Thai, computer +#-display-name: Thai computer braille +# +#+language: th +#+type: computer +#+system: thai +#+dots: 8 +# +# This table can only be used in backward mode +#+direction: backward +# +#-copyright: 2023, Thai braille fund and FOUNDATION FOR THE BLIND IN THAILAND UNDER THE ROYAL PATRONAGE OF H.M. THE QUEEN. +# +# Copyright (C) 2023 by Thai braille fund and FOUNDATION FOR THE BLIND IN THAILAND UNDER THE ROYAL PATRONAGE OF H.M. THE QUEEN. +# +# Version 2023-06-01 +# +# This file is part of liblouis. +# +# liblouis is free software: you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation, either version 2.1 of the +# License, or (at your option) any later version. +# +# liblouis 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 GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with liblouis. If not, see +# . +# +# Created and maintained by: Chatupol Nootatong +# - Dr.Wiraman Niyomphol +# - Itsawat Banlawanich +# Based on +# +#-maintainer: Chatupol Nootatong +#-author: Chatupol Nootatong +#-author: Dr. Wiraman Niyomphol +#-author: Itsawat Banlawanich + +include spaces.uti + +# Thai Consinants backward +nofor letter \x0e01 12459 # ก +nofor pass2 @1245 @12459 # ก +nofor letter \x0e02 139 # ข +nofor pass2 @13 @139 # ข +nofor letter \x0e03 13789 # ฃ +nofor pass2 @1378 @13789 # ฃ +nofor letter \x0e04 1369 # ค +nofor pass2 @136 @1369 # ค +nofor letter \x0e05 13689 # ฅ +nofor pass2 @1368 @13689 # ฅ +nofor letter \x0e06 13679 # ฆ +nofor pass2 @1367 @13679 # ฆ +nofor letter \x0e07 124569 # ง +nofor pass2 @12456 @124569 # ง +nofor letter \x0e08 2459 # จ +nofor pass2 @245 @2459 # จ +nofor letter \x0e09 349 # ฉ +nofor pass2 @34 @349 # ฉ +nofor letter \x0e0a 3469 # ช +nofor pass2 @346 @3469 # ช +nofor letter \x0e0b 23469 # ซ +nofor pass2 @2346 @23469 # ซ +nofor letter \x0e0c 34679 # ฌ +nofor pass2 @3467 @34679 # ฌ +nofor letter \x0e0d 1345679 # ญ +nofor pass2 @134567 @1345679 # ญ +nofor letter \x0e0e 14579 # ฎ +nofor pass2 @1457 @14579 # ฎ +nofor letter \x0e0f 125679 # ฏ +nofor pass2 @12567 @125679 # ฏ +nofor letter \x0e10 234579 # ฐ +nofor pass2 @23457 @234579 # ฐ +nofor letter \x0e11 2345679 # ฑ +nofor pass2 @234567 @2345679 # ฑ +nofor letter \x0e12 2345689 # ฒ +nofor pass2 @234568 @2345689 # ฒ +nofor letter \x0e13 134579 # ณ +nofor pass2 @13457 @134579 # ณ +nofor letter \x0e14 1459 # ด +nofor pass2 @145 @1459 # ด +nofor letter \x0e15 12569 # ต +nofor pass2 @1256 @12569 # ต +nofor letter \x0e16 23459 # ถ +nofor pass2 @2345 @23459 # ถ +nofor letter \x0e17 234569 # ท +nofor pass2 @23456 @234569 # ท +nofor letter \x0e18 23456789 # ธ +nofor pass2 @2345678 @23456789 # ธ +nofor letter \x0e19 13459 # น +nofor pass2 @1345 @13459 # น +nofor letter \x0e1a 12369 # บ +nofor pass2 @1236 @12369 # บ +nofor letter \x0e1b 123469 # ป +nofor pass2 @12346 @123469 # ป +nofor letter \x0e1c 12349 # ผ +nofor pass2 @1234 @12349 # ผ +nofor letter \x0e1d 13469 # ฝ +nofor pass2 @1346 @13469 # ฝ +nofor letter \x0e1e 14569 # พ +nofor pass2 @1456 @14569 # พ +nofor letter \x0e1f 12469 # ฟ +nofor pass2 @1246 @12469 # ฟ +nofor letter \x0e20 145679 # ภ +nofor pass2 @14567 @145679 # ภ +nofor letter \x0e21 1349 # ม +nofor pass2 @134 @1349 # ม +nofor letter \x0e22 134569 # ย +nofor pass2 @13456 @134569 # ย +nofor letter \x0e23 12359 # ร +nofor pass2 @1235 @12359 # ร +nofor letter \x0e25 1239 # ล +nofor pass2 @123 @1239 # ล +nofor letter \x0e27 24569 # ว +nofor pass2 @2456 @24569 # ว +nofor letter \x0e28 23479 # ศ +nofor pass2 @2347 @23479 # ศ +nofor letter \x0e29 23489 # ษ +nofor pass2 @2348 @23489 # ษ +nofor letter \x0e2a 2349 # ส +nofor pass2 @234 @2349 # ส +nofor letter \x0e2b 1259 # ห +nofor pass2 @125 @1259 # ห +nofor letter \x0e2c 12379 # ฬ +nofor pass2 @1237 @12379 # ฬ +nofor letter \x0e2d 1359 # อ +nofor pass2 @135 @1359 # อ +nofor letter \x0e2e 1234569 # ฮ +nofor pass2 @123456 @1234569 # ฮ + +# Thai vowel +nofor letter \x0e30 1a # ะ +nofor pass2 @1 @1a # ะ +nofor letter \x0e31 345a # ั +nofor pass2 @345 @345a # ั +nofor letter \x0e47 3a # ็ +nofor pass2 @3 @3a # ็ +nofor letter \x0e32 16a # า +nofor pass2 @16 @16a # า +nofor letter \x0e34 12a # ิ +nofor pass2 @12 @12a # ิ +nofor letter \x0e35 23a # ี +nofor pass2 @23 @23a # ี +nofor letter \x0e38 14a # ุ +nofor pass2 @14 @14a # ุ +nofor letter \x0e39 25a # ู +nofor pass2 @25 @25a # ู +nofor letter \x0e36 246a # ึ +nofor pass2 @246 @246a # ึ +nofor letter \x0e37 26a # ื +nofor pass2 @26 @26a # ื +nofor letter \x0e40 124a # เ +nofor pass2 @124 @124a # เ +nofor letter \x0e41 126a # แ +nofor pass2 @126 @126a # แ +nofor letter \x0e42 24a # โ +nofor pass2 @24 @24a # โ +nofor letter \x0e33 1356a # ำ +nofor pass2 @1356 @1356a # ำ +nofor letter \x0e44 156a # ไ +nofor pass2 @156 @156a # ไ +nofor letter \x0e43 1568a # ใ +nofor pass2 @1568 @1568a # ใ +nofor letter \x0e24 12358a # ฤ +nofor pass2 @12358 @12358a # ฤ +nofor letter \x0e26 1238a # ฦ +nofor pass2 @1238 @1238a # ฦ +nofor letter \x0e48 35a # ่ +nofor pass2 @35 @35a # ่ +nofor letter \x0e49 256a # ้ +nofor pass2 @256 @256a # ้ +nofor letter \x0e4a 2356a # ๊ +nofor pass2 @2356 @2356a # ๊ +nofor letter \x0e4b 236a # ๋ +nofor pass2 @236 @236a # ๋ +nofor sign \x0e46 2a # ๆ +nofor pass2 @2 @2a # ๆ +nofor letter \x0e4c 356a # ์ +nofor pass2 @356 @356a # ์ +nofor sign \x0e4d 58a # ํ +nofor pass2 @58 @58a # ํ +nofor sign \x0e3a 38a # ฺ +nofor pass2 @38 @38a # ฺ +nofor sign \x0e2f 568a # ฯ +nofor pass2 @568 @568a # ฯ +nofor sign \x0e3f 128a # ฿ +nofor pass2 @128 @128a # ฿ +nofor sign \x0e45 168a # ๅ +nofor pass2 @168 @168a # ๅ +nofor sign \x0e4e 158a # ๎ +nofor pass2 @158 @158a # ๎ +nofor sign \x0e4f 148a # ๏ +nofor pass2 @148 @148a # ๏ +nofor sign \x0e5a 2568a # ๚ +nofor pass2 @2568 @2568a # ๚ +nofor sign \x0e5b 238a # ๛ +nofor pass2 @238 @238a # ๛ + +# Thai digit +nofor digit \x0e50 3567b # ๐ +nofor pass2 @3567 @3567b # ๐ +nofor digit \x0e51 27b # ๑ +nofor pass2 @27 @27b # ๑ +nofor digit \x0e52 237b # ๒ +nofor pass2 @237 @237b # ๒ +nofor digit \x0e53 257b # ๓ +nofor pass2 @257 @257b # ๓ +nofor digit \x0e54 2567b # ๔ +nofor pass2 @2567 @2567b # ๔ +nofor digit \x0e55 267b # ๕ +nofor pass2 @267 @267b # ๕ +nofor digit \x0e56 2357b # ๖ +nofor pass2 @2357 @2357b # ๖ +nofor digit \x0e57 23567b # ๗ +nofor pass2 @23567 @23567b # ๗ +nofor digit \x0e58 2367b # ๘ +nofor pass2 @2367 @2367b # ๘ +nofor digit \x0e59 357b # ๙ +nofor pass2 @357 @357b # ๙ \ No newline at end of file diff --git a/tables/th-g0.utb b/tables/th-g0.utb new file mode 100644 index 0000000000..bbf53a6576 --- /dev/null +++ b/tables/th-g0.utb @@ -0,0 +1,177 @@ +# liblouis: Thai Current Braille System. +# +#-index-name: Thai +#-display-name: Thai braille +# +#+language: th +#+type: literary +#+system: thai +#+contraction: no +#+grade: 0 +#+dots: 6 +# +# This table can handle 8-dot braille input in backward mode, but not 6-dot braille +#+direction: forward +# +#-copyright: 2023, Thai braille fund and FOUNDATION FOR THE BLIND IN THAILAND UNDER THE ROYAL PATRONAGE OF H.M. THE QUEEN. +# +# Copyright (C) 2023 by Thai braille fund and FOUNDATION FOR THE BLIND IN THAILAND UNDER THE ROYAL PATRONAGE OF H.M. THE QUEEN. +# +# Version 2023-06-01 +# +# This file is part of liblouis. +# +# liblouis is free software: you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation, either version 2.1 of the +# License, or (at your option) any later version. +# +# liblouis 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 GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with liblouis. If not, see +# . +# +# Created and maintained by: Chatupol Nootatong +# - Dr.Wiraman Niyomphol +# - Itsawat Banlawanich +# Based on +# +#-maintainer: Chatupol Nootatong +#-author: Chatupol Nootatong +#-author: Dr. Wiraman Niyomphol +#-author: Itsawat Banlawanich + +include en-ueb-g1.ctb + +include spaces.uti + +# Thai Consinants +letter \x0e01 1245 # ก +letter \x0e02 13 # ข +letter \x0e03 356-13 # ฃ +letter \x0e04 136 # ค +letter \x0e05 36-136 # ฅ +letter \x0e06 6-136 # ฆ +letter \x0e07 12456 # ง +letter \x0e08 245 # จ +letter \x0e09 34 # ฉ +letter \x0e0a 346 # ช +letter \x0e0b 2346 # ซ +letter \x0e0c 6-346 # ฌ +letter \x0e0d 6-13456 # ญ +letter \x0e0e 6-145 # ฎ +letter \x0e0f 6-1256 # ฏ +letter \x0e10 6-2345 # ฐ +letter \x0e11 6-23456 # ฑ +letter \x0e12 36-23456 # ฒ +letter \x0e13 6-1345 # ณ +letter \x0e14 145 # ด +letter \x0e15 1256 # ต +letter \x0e16 2345 # ถ +letter \x0e17 23456 # ท +letter \x0e18 356-23456 # ธ +letter \x0e19 1345 # น +letter \x0e1a 1236 # บ +letter \x0e1b 12346 # ป +letter \x0e1c 1234 # ผ +letter \x0e1d 1346 # ฝ +letter \x0e1e 1456 # พ +letter \x0e1f 1246 # ฟ +letter \x0e20 6-1456 # ภ +letter \x0e21 134 # ม +letter \x0e22 13456 # ย +letter \x0e23 1235 # ร +letter \x0e25 123 # ล +letter \x0e27 2456 # ว +letter \x0e28 6-234 # ศ +letter \x0e29 36-234 # ษ +letter \x0e2a 234 # ส +letter \x0e2b 125 # ห +letter \x0e2c 6-123 # ฬ +letter \x0e2d 135 # อ +letter \x0e2e 123456 # ฮ + +# Thai vowel +letter \x0e30 1 # ะ +letter \x0e31 345 # ั +letter \x0e47 3 # ็ +letter \x0e32 16 # า +letter \x0e34 12 # ิ +letter \x0e35 23 # ี +letter \x0e38 14 # ุ +letter \x0e39 25 # ู +letter \x0e36 246 # ึ +letter \x0e37 26 # ื +letter \x0e40 124 # เ +letter \x0e41 126 # แ +letter \x0e42 24 # โ +letter \x0e33 1356 # ำ +letter \x0e44 156 # ไ +letter \x0e43 156-2 # ใ +letter \x0e24 1235-2 # ฤ +letter \x0e26 123-2 # ฦ +letter \x0e48 35 # ่ +letter \x0e49 256 # ้ +letter \x0e4a 2356 # ๊ +letter \x0e4b 236 # ๋ +sign \x0e46 2 # ๆ +letter \x0e4c 356 # ์ +sign \x0e4d 5 # ํ +sign \x0e3a 3 # ฺ +sign \x0e2f 56-23 # ฯ +sign \x0e3f 4-12 # ฿ +sign \x0e45 5-16 # ๅ +sign \x0e4e 4-15 # ๎ +sign \x0e4f 4-14 # ๏ +sign \x0e5a 4-256 # ๚ +sign \x0e5b 4-23 # ๛ + +# make phayan yai +noback pass2 @56-23-123-56-23 @56-123 + +# Thai digit +digit \x0e50 245b # ๐ +digit \x0e51 1b # ๑ +digit \x0e52 12b # ๒ +digit \x0e53 14b # ๓ +digit \x0e54 145b # ๔ +digit \x0e55 15b # ๕ +digit \x0e56 124b # ๖ +digit \x0e57 1245b # ๗ +digit \x0e58 125b # ๘ +digit \x0e59 24b # ๙ + +#english character +attribute englishcharacter abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ + +#attribute Thai Consinants +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 + +#attribute ThaiDigit +attribute thaidigit \x0e50\x0e51\x0e52\x0e53\x0e54\x0e55\x0e56\x0e57\x0e58\x0e59 + +# Add a dot 6 before the number sign. When detecting a character as a Thai number +noback pass2 @3456%thaidigit @6* + +# If 3 or more consecutive . marks are found, change to dot 6. +noback context "..." @6-6-6#1=1 +noback context #1=1"." @6 +noback context #1=1 #1=0 + +# Remove the virtual dots from the Thai Digit. +noback pass3 @245b @245 +noback pass3 @1b @1 +noback pass3 @12b @12 +noback pass3 @14b @14 +noback pass3 @145b @145 +noback pass3 @15b @15 +noback pass3 @124b @124 +noback pass3 @1245b @1245 +noback pass3 @125b @125 +noback pass3 @24b @24 + +include th-comp8-backward.utb \ No newline at end of file diff --git a/tests/Makefile.am b/tests/Makefile.am index e116ca6e3a..01e1690d1b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -195,6 +195,7 @@ dist_braille_specs_TESTS = \ braille-specs/sw-ke-dictionary.yaml \ braille-specs/sw-ke.yaml \ braille-specs/ta-ta-g1_harness.yaml \ + braille-specs/th.yaml \ braille-specs/tt.yaml \ braille-specs/uk.yaml \ braille-specs/ur-pk-g2.yaml \ diff --git a/tests/braille-specs/Makefile.am b/tests/braille-specs/Makefile.am index f1b564fea7..2eb57b67f4 100644 --- a/tests/braille-specs/Makefile.am +++ b/tests/braille-specs/Makefile.am @@ -128,6 +128,7 @@ EXTRA_DIST = \ sw-ke-dictionary.yaml \ sw-ke.yaml \ ta-ta-g1_harness.yaml \ + th.yaml \ tt.yaml \ uk.yaml \ ur-pk-g2.yaml \ diff --git a/tests/braille-specs/sv.yaml b/tests/braille-specs/sv.yaml index 45f94f980a..beea9a1788 100644 --- a/tests/braille-specs/sv.yaml +++ b/tests/braille-specs/sv.yaml @@ -4,7 +4,7 @@ # - Svenska skrivregler för punktskrift # - Kortskrift nivå 1 och 2 # -# Copyright (C) 2022 by Insyn Scandinavia AB +# Copyright (C) 2022-2023 by Insyn Scandinavia AB # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright @@ -31,8 +31,6 @@ tests: - # Single digits - 1 2 3 4 5 6 7 8 9 0 - ⠼⠁ ⠼⠃ ⠼⠉ ⠼⠙ ⠼⠑ ⠼⠋ ⠼⠛ ⠼⠓ ⠼⠊ ⠼⠚ -flags: {testmode: forward} -tests: - # Capitalization - Hej! - ⠠⠓⠑⠚⠖ @@ -51,23 +49,20 @@ tests: - # Time - 15:35 - ⠼⠁⠑⠒⠼⠉⠑ - - # All caps phrase - - VAD SÄGER DU? - - ⠠⠠⠠⠧⠁⠙ ⠎⠜⠛⠑⠗ ⠙⠥⠢⠱ + # Spaces + - ['\x0020', ' '] + - ['\x0009', '\x0020', {xfail: {backward: true}}] + - ['\x000a', '\x0020', {xfail: {backward: true}}] + - ['\x000d', '\x0020', {xfail: {backward: true}}] + - ['\x00a0', '\x0020', {xfail: {backward: true}}] - # Diacritic letters - ă ć ɖ ì ó ţ ẅ ḝ - ⠈⠁ ⠬⠔⠉ ⠈⠙ ⠬⠢⠊ ⠬⠔⠕ ⠣⠂⠞ ⠬⠆⠺ ⠈⠑ - -# Spaces -flags: {testmode: forward} -tests: - - ['\x0009', '\x0020'] - - ['\x000a', '\x0020'] - - ['\x000d', '\x0020'] -flags: {testmode: bothDirections} -tests: - - ['\x0020', '\x0020'] - - ['\x00a0', 'a'] + - xfail: {backward: true} + # All caps phrase + - - VAD SÄGER DU? + - ⠠⠠⠠⠧⠁⠙ ⠎⠜⠛⠑⠗ ⠙⠥⠢⠱ + - xfail: {backward: true} # ---------------------------------- # grade 1 (partially contracted) @@ -77,13 +72,15 @@ table: language: sv grade: 1 __assert-match: sv-g1.ctb +flags: {testmode: bothDirections} tests: + - # Non-contraction letters + - Nej s som i Sigurd. + - ⠠⠝⠑⠚ ⠒⠎ ⠎ ⠊ ⠠⠎⠊⠛⠥⠗⠙⠄ - # All caps phrase - VAD SÄGER DU? - ⠠⠠⠠⠺ ⠎⠜⠛⠑⠗ ⠙⠥⠢⠱ - - # Non-contraction letters - - Nej s som i Sigurd. - - ⠠⠝⠑⠚ ⠰⠎ ⠎ ⠊ ⠠⠎⠊⠛⠥⠗⠙⠄ + - xfail: {backward: true} # ---------------------------------- # grade 2 (fully contracted) @@ -93,6 +90,7 @@ table: language: sv grade: 2 __assert-match: sv-g2.ctb +flags: {testmode: bothDirections} tests: - # Part-word contraction - Han sa att de kunde ingenting. diff --git a/tests/braille-specs/th.yaml b/tests/braille-specs/th.yaml new file mode 100644 index 0000000000..6fd5397af8 --- /dev/null +++ b/tests/braille-specs/th.yaml @@ -0,0 +1,111 @@ +# encoding: utf-8 +display: unicode.dis +table: + language: th + dots: 6 + __assert-match: th-g0.utb + +flags: {testmode: forward} +tests: + - [ก ไก่, ⠛⠀⠱⠛⠔] + - [ข ไข่, ⠅⠀⠱⠅⠔] + - [ฃ ฃวด, ⠴⠅⠀⠴⠅⠺⠙] + - [ค ควาย, ⠥⠀⠥⠺⠡⠽] + - [ฅ ฅน, ⠤⠥⠀⠤⠥⠝] + - [ฆ ระฆัง, ⠠⠥⠀⠗⠁⠠⠥⠜⠻] + - [ง งู, ⠻⠀⠻⠒] + - [จ จาน, ⠚⠀⠚⠡⠝] + - [ฉ ฉิ่ง, ⠌⠀⠌⠃⠔⠻] + - [ช ช้าง, ⠬⠀⠬⠲⠡⠻] + - [ซ โซ่, ⠮⠀⠊⠮⠔] + - [ฌ กเฌอ, ⠠⠬⠀⠛⠋⠠⠬⠕] + - [ญ หญิง, ⠠⠽⠀⠓⠠⠽⠃⠻] + - [ฎ ชฎา, ⠠⠙⠀⠬⠠⠙⠡] + - [ฏ ปะฏัก, ⠠⠳⠀⠯⠁⠠⠳⠜⠛] + - [ฐ ฐาน, ⠠⠞⠀⠠⠞⠡⠝] + - [ฑ มนโฑ, ⠠⠾⠀⠍⠝⠊⠠⠾] + - [ฒ ผู้เฒ่า, ⠤⠾⠀⠏⠒⠲⠋⠤⠾⠔⠡] + - [ณ เณร, ⠠⠝⠀⠋⠠⠝⠗] + - [ด เด็ก, ⠙⠀⠋⠙⠄⠛] + - [ต เต่า, ⠳⠀⠋⠳⠔⠡] + - [ถ ถุง, ⠞⠀⠞⠉⠻] + - [ท ทหาร, ⠾⠀⠾⠓⠡⠗] + - [ธ ธง, ⠴⠾⠀⠴⠾⠻] + - [น หนู, ⠝⠀⠓⠝⠒] + - [บ ใบไม้, ⠧⠀⠱⠂⠧⠱⠍⠲] + - [ป ปลา, ⠯⠀⠯⠇⠡] + - [ผ ผึ้ง, ⠏⠀⠏⠪⠲⠻] + - [ฝ ฝา, ⠭⠀⠭⠡] + - [พ พาน, ⠹⠀⠹⠡⠝] + - [ฟ ฟัน, ⠫⠀⠫⠜⠝] + - [ภ สำเภา, ⠠⠹⠀⠎⠵⠋⠠⠹⠡] + - [ม ม้า, ⠍⠀⠍⠲⠡] + - [ย ยักษ์, ⠽⠀⠽⠜⠛⠤⠎⠴] + - [ร เรือ, ⠗⠀⠋⠗⠢⠕] + - [ล ลิง, ⠇⠀⠇⠃⠻] + - [ฤ พฤหัสบดี, ⠗⠂⠀⠹⠗⠂⠓⠜⠎⠧⠙⠆] + - [ว แหวน, ⠺⠀⠀⠣⠓⠺⠝] + - [ศ ศาลา, ⠠⠎⠀⠠⠎⠡⠇⠡] + - [ษ เมษา, ⠤⠎⠀⠀⠋⠍⠤⠎⠡] + - [ส เสือ, ⠎⠀⠋⠎⠢⠕] + - [ห หีบ, ⠓⠀⠓⠆⠧] + - [ฬ จุฬา, ⠠⠇⠀⠚⠉⠠⠇⠡] + - [ฦ, ⠇⠂] + - [อ อ่าง, ⠕⠀⠕⠔⠡⠻] + - [ฮ นกฮูก, ⠿⠀⠝⠛⠿⠒⠛] + - [ดินสอ ปากกา ฯลฯ, ⠙⠃⠝⠎⠕⠀⠯⠡⠛⠛⠡⠀⠰⠇] + - [มากมาย .......... จำไม่ได้, ⠍⠡⠛⠍⠡⠽⠀⠠⠠⠠⠠⠠⠠⠠⠠⠠⠠⠀⠚⠵⠱⠍⠔⠱⠙⠲] + - [กา ก่า ก้า ก๊า ก๋า, ⠛⠡⠀⠛⠔⠡⠀⠛⠲⠡⠀⠛⠶⠡⠀⠛⠦⠡] + - [เตะ, ⠋⠳⠁] + - [ด้วย, ⠙⠲⠺⠽] + - [ส่ง, ⠎⠔⠻] + - [จาก, ⠚⠡⠛] + - [แมน, ⠣⠍⠝] + - [กิน, ⠛⠃⠝] + - [กลืน, ⠛⠇⠢⠝] + - [ใบ, ⠱⠂⠧] + - [ต่าง ๆ, ⠳⠔⠡⠻⠀⠂] + - [ไป, ⠱⠯] + - [จำ, ⠚⠵] + - [จะ, ⠚⠁] + - [มัน, ⠍⠜⠝] + - [ผี, ⠏⠆] + - [ฤๅ ษี, ⠗⠂⠐⠡⠀⠤⠎⠆] + - [95/8, ⠼⠊⠑⠸⠌⠼⠓] + - [ลุง, ⠇⠉⠻] + - [แตงโม, ⠣⠳⠻⠊⠍] + - [เป็น, ⠋⠯⠄⠝] + - [จ๋า, ⠚⠦⠡] + - [ชม., ⠬⠍⠲] + - [1.5, ⠼⠁⠲⠑] + - [ธฺ ธรรมะ, ⠴⠾⠄⠀⠴⠾⠗⠗⠍⠁] + - [วันจันทร์, ⠺⠜⠝⠚⠜⠝⠾⠗⠴] + - [ไปใหน, ⠱⠯⠱⠂⠓⠝] + - [แดงว่า "เธอชื่ออะไร", ⠣⠙⠻⠺⠔⠡⠀⠦⠋⠴⠾⠕⠬⠢⠔⠕⠕⠁⠱⠗⠴] + - [สวดมนต์ ธรรมมํ ธรรมมัง, ⠎⠺⠙⠍⠝⠳⠴⠀⠴⠾⠗⠗⠍⠍⠐⠀⠴⠾⠗⠗⠍⠍⠜⠻] + - [ก๊อก, ⠛⠶⠕⠛] + - [กรุงเทพ ฯ, ⠛⠗⠉⠻⠋⠾⠹⠀⠰⠆] + - [๑+๑ เป็น ๒, ⠠⠼⠁⠐⠖⠠⠼⠁⠀⠋⠯⠄⠝⠀⠠⠼⠃] + - [รู้, ⠗⠒⠲] + - [ผมมี๑๐๐ ฿, ⠏⠍⠍⠆⠠⠼⠁⠚⠚⠀⠈⠃] + - [เลขไทย ๑๒๓๔๕๖๗๘๙, ⠋⠇⠅⠱⠾⠽⠀⠠⠼⠁⠃⠉⠙⠑⠋⠛⠓⠊] + +# backward translation of 8-dot braille, also handled by 6-dot table +table: + language: th + dots: 8 + __assert-match: th-comp8-backward.utb +table: + language: th + dots: 6 + __assert-match: th-g0.utb +flags: {testmode: backward} +tests: + - [⠎⠺⠜⠎⠙⠆⠥⠗⠜⠧, สวัสดีครับ] + - [⠋⣾⠕⠣⠇⠁⠌⠜⠝, เธอและฉัน] + - [⠏⠒⠲⠋⢾⠔⠡⠋⠭⠲⠡⠥⠕⠽, ผู้เฒ่าเฝ้าคอย] + - [⡹⠡⢎⠡⠱⠾⠽, ภาษาไทย] + - [⠏⠒⠲⢱⠓⡽⠔, ผู้ใหญ่] + - [⠺⠜⠝⠚⠜⠝⠾⠗⠴, วันจันทร์] + - [⠣⠳⠻⠊⠍, แตงโม] + - [⠛⠡⠀⠛⠔⠡⠀⠛⠲⠡⠀⠛⠶⠡⠀⠛⠦⠡, กา ก่า ก้า ก๊า ก๋า]