aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2016-03-20 19:03:02 +0100
committerRobert Alessi <alessi@robertalessi.net>2016-03-20 19:03:02 +0100
commitfbf4e6351ea57d656eea8fe049141598ae95d1a6 (patch)
treeff67935e3f838d44774daf83bb6701f37dce7e79
parentd83d51e21031f9ade05b196bf636e7e86918c3b4 (diff)
downloadarabluatex-fbf4e6351ea57d656eea8fe049141598ae95d1a6.tar.gz
assimilations [Wright i §14 (b)]; no more euphonic tašdīd in novoc mode
-rw-r--r--arabluatex.lua4
-rw-r--r--arabluatex_fullvoc.lua9
-rw-r--r--arabluatex_novoc.lua65
-rw-r--r--arabluatex_trans.lua4
-rw-r--r--arabluatex_voc.lua17
5 files changed, 90 insertions, 9 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index 8ebc30b..de33bb3 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -204,8 +204,8 @@ local function novoc(str)
204 for i = 1,#tanwinnv do 204 for i = 1,#tanwinnv do
205 inside = string.gsub(inside, tanwinnv[i].a, tanwinnv[i].b) 205 inside = string.gsub(inside, tanwinnv[i].a, tanwinnv[i].b)
206 end 206 end
207 for i = 1,#trigraphs do 207 for i = 1,#trigraphsnv do
208 inside = string.gsub(inside, trigraphs[i].a, trigraphs[i].b) 208 inside = string.gsub(inside, trigraphsnv[i].a, trigraphsnv[i].b)
209 end 209 end
210 for i = 1,#digraphs do 210 for i = 1,#digraphs do
211 inside = string.gsub(inside, digraphs[i].a, digraphs[i].b) 211 inside = string.gsub(inside, digraphs[i].a, digraphs[i].b)
diff --git a/arabluatex_fullvoc.lua b/arabluatex_fullvoc.lua
index 472583e..b0e00d4 100644
--- a/arabluatex_fullvoc.lua
+++ b/arabluatex_fullvoc.lua
@@ -164,7 +164,9 @@ trigraphsfv = { -- trigraphs or more
164 -- words ending in -āT with silent wāw/yāʾ 164 -- words ending in -āT with silent wāw/yāʾ
165 {a="(_a)UA", b="%1وا"}, 165 {a="(_a)UA", b="%1وا"},
166 {a="(_a)U", b="%1و"}, 166 {a="(_a)U", b="%1و"},
167 {a="(_a)I", b="%1ي"} 167 {a="(_a)I", b="%1ي"},
168 -- assimilations
169 {a="(n)(%s)([rlmnwy])", b="%1%2%3%3"}
168} 170}
169 171
170-- this is new 172-- this is new
@@ -210,6 +212,11 @@ digraphsfv = {
210 {a="([%_%^%.]?[btjghxdrzs%`fqklmnwy])$", b="%1ْ"}, 212 {a="([%_%^%.]?[btjghxdrzs%`fqklmnwy])$", b="%1ْ"},
211 {a="([%_%^%.]?[btjghxdrzs%`fqklmnwy])([%s])", b="%1ْ%2"}, 213 {a="([%_%^%.]?[btjghxdrzs%`fqklmnwy])([%s])", b="%1ْ%2"},
212 {a="([%_%^%.]?[btjghxdrzs%`fqklmnwy])([%_]?[^%_uaiUAIًٌٍ])", b="%1ْ%2"}, 214 {a="([%_%^%.]?[btjghxdrzs%`fqklmnwy])([%_]?[^%_uaiUAIًٌٍ])", b="%1ْ%2"},
215 -- take out sukūn in cases of assimilation
216 {a="(n)(ْ)(%s)([روي])", b="%1%3%4"},
217 {a="(n)(ْ)(%s)([ل])", b="%1%3%4"},
218 {a="(n)(ْ)(%s)([م])", b="%1%3%4"},
219 {a="(n)(ْ)(%s)([ن])", b="%1%3%4"},
213 {a="ْ\"", b="\""}, 220 {a="ْ\"", b="\""},
214 -- sukūn end 221 -- sukūn end
215 {a="_t", b="ث"}, 222 {a="_t", b="ث"},
diff --git a/arabluatex_novoc.lua b/arabluatex_novoc.lua
index 4710ccc..4f08d68 100644
--- a/arabluatex_novoc.lua
+++ b/arabluatex_novoc.lua
@@ -22,18 +22,79 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2202111-1307, USA. 2202111-1307, USA.
23--]] 23--]]
24 24
25trigraphsnv = { -- trigraphs or more
26 -- Allah
27 {a="l%-l_ah", b="l-ll_ah"},
28 -- 'llatI / 'llad_I
29 {a="^'ll(a)([%_]?[dt])", b="ال%1%2"},
30 {a="(%s)'ll(a)([%_]?[dt])", b="%1ال%2%3"},
31 -- al- + lām
32 {a="^(a)l%-(l)", b="ا%1ل%2"},
33 {a="(%s)(a)l%-(l)", b="%1ا%2ل%3"},
34 -- al- + solar consonant
35 {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2"},
36 {a="(%s)(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3"},
37 -- assim. art. + solar consonant
38 {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل"},
39 {a="(%s)(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل"},
40 -- al- + initial unstable hamza
41 {a="^(a)l%-([uai])", b="ا%1لا%2"},
42 {a="(%s)(a)l%-([uai])", b="%1ا%2لا%3"},
43 -- li-/la- + art. + initial unstable hamza is a special orthography
44 {a="l([ai])%-l%-([uai])", b="ل%1لا%2"},
45 -- al- + lunar consonant (i.e. what remains)
46 {a="^(a)l%-", b="ا%1ل"},
47 {a="(%s)(a)l%-", b="%1ا%2ل"},
48 -- art. with waṣla + lām
49 {a="'l%-(l)", b="ال%1"},
50 -- art. with waṣla + solar consonant
51 {a="'l%-([%_%^%.]?[tdrzsn])", b="ال%1"},
52 -- li-/la- + art. + lām
53 {a="l([ai])%-l%-(l)", b="ل%1%2"},
54 -- assim. art. with waṣla + solar consonant
55 {a="'([%_%^%.]?[tdrzsn])%-", b="ال"},
56 -- li-/la- + art. + solar consonant is a special orthography
57 {a="l([ai])%-l%-([%_%^%.]?[tdrzsn])", b="ل%1ل%2"},
58 -- li-/la + assim. art. + solar consonant is a special orthography
59 {a="l([ai])%-([%_%^%.]?[tdrzsn])%-([%_%^%.]?[tdrzsn])", b="ل%1ل%3"},
60 -- art. with waṣla + initial unstable hamza
61 {a="'l%-([uai])", b="الا%1"},
62 -- art. with waṣla + lunar consonant (i.e. what remains)
63 {a="'l%-", b="ال"},
64 -- the silent wāw
65 {a="uU$", b="uو"},
66 {a="uU(%W)", b="uو%1"},
67 {a="aU$", b="aو"},
68 {a="aU(%W)", b="aو%1"},
69 {a="iU$", b="iو"},
70 {a="iU(%W)", b="iو%1"},
71 -- words ending in -āT with silent wāw/yāʾ
72 {a="(_a)UA", b="%1وا"},
73 {a="(_a)U", b="%1و"},
74 {a="(_a)I", b="%1ي"}
75}
76
25tanwinnv = { 77tanwinnv = {
26 {a="uNU", b="و"}, 78 {a="uNU", b="و"},
27 {a="aNU", b="وا"}, 79 {a="aNU", b="وا"},
28 {a="iNU", b="و"}, 80 {a="iNU", b="و"},
29 {a="uN", b=""}, 81 -- assimilations (begin)
82-- {a="(uN)(%s)([rlmnwy])", b="|%2%3%3"},
83-- {a="(aN)(_A)(%s)([rlmnwy])", b="ى%3%4%4"},
84-- {a="(aN)(Y)(%s)([rlmnwy])", b="ى%3%4%4"},
85-- {a="(T)(aN)(%s)([rlmnwy])", b="%1%3%4%4"},
86-- {a="(ء)(aN)(%s)([rlmnwy])", b="%1%3%4%4"},
87-- {a="([^TA])(aN)(%s)([rlmnwy])", b="%1ا%3%4%4"},
88-- {a="(iN)(%s)([rlmnwy])", b="|%2%3%3"},
89 --assimilations (end)
90 {a="(uN)", b=""},
30 {a="(B)(aN)", b="%1"}, 91 {a="(B)(aN)", b="%1"},
31 {a="(aN)(_A)", b="ى"}, 92 {a="(aN)(_A)", b="ى"},
32 {a="(aN)(Y)", b="ى"}, 93 {a="(aN)(Y)", b="ى"},
33 {a="(T)(aN)", b="%1"}, 94 {a="(T)(aN)", b="%1"},
34 {a="(ء)(aN)", b="%1"}, 95 {a="(ء)(aN)", b="%1"},
35 {a="([^TA])(aN)", b="%1ا"}, 96 {a="([^TA])(aN)", b="%1ا"},
36 {a="iN", b=""} 97 {a="(iN)", b=""}
37} 98}
38 99
39longvnv = { 100longvnv = {
diff --git a/arabluatex_trans.lua b/arabluatex_trans.lua
index 3a69463..1e2d89a 100644
--- a/arabluatex_trans.lua
+++ b/arabluatex_trans.lua
@@ -135,7 +135,9 @@ trigraphstrdmg = { -- trigraphs or more
135 -- words ending in -āT with silent wāw/yāʾ 135 -- words ending in -āT with silent wāw/yāʾ
136 {a="(_a)UA", b="A"}, 136 {a="(_a)UA", b="A"},
137 {a="(_a)U", b="A"}, 137 {a="(_a)U", b="A"},
138 {a="(_a)I", b="A"} 138 {a="(_a)I", b="A"},
139 -- assimilations
140 {a="(n)(%s)([rlmnwy])", b="%3%2%3"}
139} 141}
140 142
141tanwintrdmg = { 143tanwintrdmg = {
diff --git a/arabluatex_voc.lua b/arabluatex_voc.lua
index a3c9b62..b6dbd12 100644
--- a/arabluatex_voc.lua
+++ b/arabluatex_voc.lua
@@ -195,21 +195,32 @@ trigraphs = { -- trigraphs or more
195 -- words ending in -āT with silent wāw/yāʾ 195 -- words ending in -āT with silent wāw/yāʾ
196 {a="(_a)UA", b="%1وا"}, 196 {a="(_a)UA", b="%1وا"},
197 {a="(_a)U", b="%1و"}, 197 {a="(_a)U", b="%1و"},
198 {a="(_a)I", b="%1ي"} 198 {a="(_a)I", b="%1ي"},
199 -- assimilations
200 {a="(n)(%s)([rlmnwy])", b="%1%2%3%3"}
199} 201}
200 202
201tanwin = { 203tanwin = {
202 {a="uNU", b="ٌو"}, 204 {a="uNU", b="ٌو"},
203 {a="aNU", b="ًوا"}, 205 {a="aNU", b="ًوا"},
204 {a="iNU", b="ٍو"}, 206 {a="iNU", b="ٍو"},
205 {a="uN", b="ٌ"}, 207 -- assimilations (begin)
208 {a="(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"},
209 {a="(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"},
210 {a="(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"},
211 {a="(T)(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"},
212 {a="(ء)(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"},
213 {a="([^TA])(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"},
214 {a="(iN)(%s)([rlmnwy])", b="ٍ%2%3%3"},
215 -- assimilations (end)
216 {a="(uN)", b="ٌ"},
206 {a="(B)(aN)", b="%1ً"}, 217 {a="(B)(aN)", b="%1ً"},
207 {a="(aN)(_A)", b="ًى"}, 218 {a="(aN)(_A)", b="ًى"},
208 {a="(aN)(Y)", b="ًى"}, 219 {a="(aN)(Y)", b="ًى"},
209 {a="(T)(aN)", b="%1ً"}, 220 {a="(T)(aN)", b="%1ً"},
210 {a="(ء)(aN)", b="%1ً"}, 221 {a="(ء)(aN)", b="%1ً"},
211 {a="([^TA])(aN)", b="%1ًا"}, 222 {a="([^TA])(aN)", b="%1ًا"},
212 {a="iN", b="ٍ"} 223 {a="(iN)", b="ٍ"}
213} 224}
214 225
215digraphs = { 226digraphs = {