Debian Codegraph @

tables/hbo-common-rules.uti

raw
1 # liblouis: common rules for Classical/Biblical Hebrew
2 #
3 #-license: lgpl-2.1
4
5 # This file is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
9 #
10 # This file is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this file; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 # liblouis comes with ABSOLUTELY NO WARRANTY.
19
20 # This table contains rules that are shared by all three Classical/
21 # Biblical Hebrew systems: the International Hebrew Braille Code
22 # (hbo-ihbc.uti and hbo.utb), the fully cantillated IHBC-McAllister
23 # system (hbo-cantillated.uti and hbo-cantillated.utb), and the
24 # Katz system with no shewas or dageshes (hbo-slim.uti and
25 # hbo-slim.utb).
26
27 # Developed by Eric J. Harvey with support from the national
28 # Endowment for the Humanities (USA) and Stanford University.
29 # Many thanks to Leonard de Ruijter, Sarah Blake LaRose, Matthew
30 # Yeater, and Paul Geoghegan for their help developing and testing the
31 # tables, and to Abbie Howell for suggesting the inclusion of Yiddish
32 # characters and reviewing code.
33
34 # Copyright (C) 2025 Eric J. Harvey
35
36 #-copyright: 2025, Eric J. Harvey
37
38 #-maintainer: Eric J. Harvey <[email protected]>
39
40 #-author: Eric J. Harvey <[email protected]>
41
42 # Include common characters
43 include he-common-consonants.uti
44 include he-common-vowels-ihbc.uti
45 include spaces.uti
46
47 # Eliminate direction-switching characters
48 noback correct "‎" ? # Left-to-right mark
49 noback correct "‏" ? # Right-to-left mark
50 noback correct "‭" ? # left-to-right override
51 noback correct "‮" ? # Right-to-left override
52
53 # character reordering
54 ## Move dagesh before nearest preceding consonant
55 noback correct [$l]"ּ" "ּ"*
56 noback correct [$l%vowelCant.]"ּ" "ּ"*
57
58 ## Move shin and sin dot next to sin/shin consonant
59 ## Prerequisite for “always” rule in he-common-consonants.uti
60 ## to work with vocalized texts.
61 noback correct [%vowelCant.]"ׂ" "ׂ"*
62 noback correct [%vowelCant.]"ׁ" "ׁ"*
63
64 # Contracting dagesh for bet, kaf, pe, and tav
65 noback context "ּב" @12
66 noback context "ּכ" @13
67 noback context "ּך" @13
68 noback context "ּפ" @1234
69 noback context "ּף" @1234
70 noback context "ּת" @1256
71
72 # Contracting ultralong vowels (vowel+mater lectionis)
73 ## Dagesh and meteg complete the vowelCantDagesh union
74 attribute vowelCantDagesh \x05bc\x05bd
75
76 ## Holam-waw and consonantal waw
77 noback pass3 !%vowelCantDagesh[@2456-135a] @246
78 noback pass3 [@2456-135a]$sp @246
79 noback pass3 [@2456-135a]~ @246
80 noback pass3 [@135a-2456]%hebLetter @246
81
82 ## Shuruq and consonantal waw
83 ## A dagesh+waw that is followed by a vowel is a consonantal waw with
84 ## dagesh, not a shuruq. We distinguish the two up front, on the Hebrew
85 ## "ּו" sequence itself, so that the bare dot pattern 346 is only ever
86 ## produced for a genuine shuruq. This avoids a later pass rule matching
87 ## the naked 346 cell, which would also match identical cells produced by
88 ## other languages when this table is combined with them.
89 noback context ["ּו"]%vowel @5a-2456
90 noback context "ּו" @346
91
92 ## Hiriq Yod
93 noback pass3 @24a-245 @35 Hiriq-yod
94
95 ## Contract tsere-yod
96 noback pass3 @34a-245 @3456
97
98 ## Shin and sin with dagesh
99 noback correct ["ש"%vowelCant.]"\x05bc\x05c2" "\x05bc\x05c2"*
100 noback correct ["ש"%vowelCant.]"\x05bc\x05c1" "\x05bc\x05c1"*
101 noback always \x05c1\x05e9 146
102 noback always \x05c2\x05e9 156
103 noback pass2 @146-5a @5a-146
104 noback pass2 @156-5a @5a-156
105
106 ## Changing dagesh-he to mappiq
107 noback pass3 @5a-125 @45-125
108
109 # Back-translation rules
110 ## Move the dagesh cell after the following consonant or sin, as
111 ## virtual dots 5a
112 nofor pass2 @5[$l] *@5a
113 nofor pass2 @5[@156] *@5a
114
115 ## Reverse mappiq
116 nofor pass3 @45-125 @5-125
117
118 ## Uncontract hiriq-yod
119 nofor pass4 @35 @24-245 Hiriq-yod
120
121 ## Uncontract tsere-yod
122 nofor pass4 $l[@3456] @34-245
123 nofor pass4 %vowelCant[@3456] @34-245
124
125 ## Final letters
126 nofor correct _$lS"כ"~ "ך"
127 nofor correct _$lS"כ"[$sp] "ך"*
128 nofor correct _$lS"כ"[$S.$sp] "ך"*
129 nofor correct _$lS"כ"[$S.]~ "ך"*
130 nofor correct _$lS"מ"~ "ם"
131 nofor correct _$lS"מ"[$sp] "ם"*
132 nofor correct _$lS"מ"[$S.$sp] "ם"*
133 nofor correct _$lS"מ"[$S.]~ "ם"*
134 nofor correct _$lS"נ"~ "ן"
135 nofor correct _$lS"נ"[$sp] "ן"*
136 nofor correct _$lS"נ"[$S.$sp] "ן"*
137 nofor correct _$lS"נ"[$S.]~ "ן"*
138 nofor correct _$lS"פ"~ "ף"
139 nofor correct _$lS"פ"[$sp] "ף"*
140 nofor correct _$lS"פ"[$S.$sp] "ף"*
141 nofor correct _$lS"פ"[$S.]~ "ף"*
142 nofor correct _$lS"צ"~ "ץ"
143 nofor correct _$lS"צ"[$sp] "ץ"*
144 nofor correct _$lS"צ"[$S.$sp] "ץ"*
145 nofor correct _$lS"צ"[$S.]~ "ץ"*
146
147 ## Holam-waw and shuruq
148 nofor always וּ 346
149 nofor always וֹ 246
150
151 ## Consonantal waw with holam haser for vav (U+05BA)
152 nofor always \x05d5\x05ba 2456-135