From aa160a2fb75d07c7575e7677a8450896044269d3 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Wed, 25 May 2016 18:52:33 +0200 Subject: =?UTF-8?q?implementation=20of=20=CA=BEi=CA=BFr=C4=81b=20=C4=A1ayr?= =?UTF-8?q?=20mun=E1=B9=A3arif=20(dmg=20mode)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arabluatex_fullvoc.lua | 60 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 12 deletions(-) (limited to 'arabluatex_fullvoc.lua') diff --git a/arabluatex_fullvoc.lua b/arabluatex_fullvoc.lua index 577fff7..991db22 100644 --- a/arabluatex_fullvoc.lua +++ b/arabluatex_fullvoc.lua @@ -23,6 +23,8 @@ along with this program. If not, see --]] hamzafv = { + -- next line for ʾiʿrāb hyphen + {a="(')(%-)([uaiUAI])", b="%1%3"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, @@ -51,7 +53,8 @@ hamzafv = { {a="'i'([^uaiUAI])", b="إI%1"}, -- madda (historic writing below) {a="'a'([^uaiUAI])", b="آ%1"}, - {a="'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, +--tmp {a="'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, + {a="([^UIui])'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="%1آ%2"}, {a="(A)(')(uN?)$", b="aآء%3"}, {a="(A)(')(uN?)(%W)", b="aآء%3%4"}, {a="(A)(')(iN?)$", b="aآء%3"}, @@ -71,7 +74,7 @@ hamzafv = { {a="([^uai])(')([uai]N?)$", b="%1ء%3"}, {a="([^uai])(')([uai]N?)(%W)", b="%1ء%3%4"}, -- u - {a="(u)(')([uai]?N)$", b="%1ؤ%3"}, + {a="(u)(')([uai]N?)$", b="%1ؤ%3"}, {a="(u)(')([uai]N?)(%W)", b="%1ؤ%3%4"}, {a="(u)(')$", b="%1ؤْ"}, {a="(u)(')(%W)", b="%1ؤْ%3"}, @@ -115,6 +118,8 @@ hamzafv = { } hamzafveasy = { -- differences marked below with 'easy' + -- next line for ʾiʿrāb hyphen + {a="(')(%-)([uaiUAI])", b="%1%3"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, @@ -143,14 +148,17 @@ hamzafveasy = { -- differences marked below with 'easy' {a="'i'([^uaiUAI])", b="إI%1"}, -- madda (historic writing below) {a="'a'([^uaiUAI])", b="آ%1"}, - {a="'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, ---easy {a="(A)(')(uN?)$", b="aآء%3"}, ---easy {a="(A)(')(uN?)(%W)", b="aآء%3%4"}, ---easy {a="(A)(')(iN?)$", b="aآء%3"}, ---easy {a="(A)(')(iN?)(%W)", b="aآء%3%4"}, ---easy {a="(A)(')(i)", b="aآئ%3"}, -- historic madda ---easy {a="(A)(')(u)", b="aآؤ%3"}, -- historic madda ---easy {a="(A)(')", b="aآء"}, -- historic madda +--tmp {a="'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, + {a="([^UIui])'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="%1آ%2"}, + --easy (begin) + {a="(A)(')(uN?)$", b="aاء%3"}, + {a="(A)(')(uN?)(%W)", b="aاء%3%4"}, + {a="(A)(')(iN?)$", b="aاء%3"}, + {a="(A)(')(iN?)(%W)", b="aاء%3%4"}, + {a="(A)(')(i)", b="aائ%3"}, -- historic madda + {a="(A)(')(u)", b="aاؤ%3"}, -- historic madda + {a="(A)(')", b="aاء"}, -- historic madda + --easy (end) -- initial (needs both ^ and %W patterns) {a="^(')([ua])", b="أ%2"}, {a="^(')(i)", b="إ%2"}, @@ -163,7 +171,7 @@ hamzafveasy = { -- differences marked below with 'easy' {a="([^uai])(')([uai]N?)$", b="%1ء%3"}, {a="([^uai])(')([uai]N?)(%W)", b="%1ء%3%4"}, -- u - {a="(u)(')([uai]?N)$", b="%1ؤ%3"}, + {a="(u)(')([uai]N?)$", b="%1ؤ%3"}, {a="(u)(')([uai]N?)(%W)", b="%1ؤ%3%4"}, {a="(u)(')$", b="%1ؤْ"}, {a="(u)(')(%W)", b="%1ؤْ%3"}, @@ -389,6 +397,18 @@ trigraphsfveasy = { -- trigraphs or more (see 'easy' tag below for the diffs) } digraphsfv = { + -- iʿrāb: straight double quote must be discarded + {a="(%-)(\"?[UI]na)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?[UI]na)(%p?)$", b="%2%3"}, + {a="(%-)(\"?At[ui])(%p?%s)", b="%2%3"}, + {a="(%-)(\"?At[ui])(%p?)$", b="%2%3"}, + {a="(%-)(\"?Ani)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?Ani)(%p?)$", b="%2%3"}, + {a="(%-)(\"?ayni)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?ayni)(%p?)$", b="%2%3"}, + {a="(%-)(\"?[uai])(%p?%s)", b="%2%3"}, + {a="(%-)(\"?[uai])(%p?)$", b="%2%3"}, + -- ʾiʿrāb (end) -- initial straight double quote gives a connective ʾalif {a="^\"[uai]", b="ٱ"}, {a="([%s%-])\"[uai]", b="%1ٱ"}, @@ -436,9 +456,11 @@ digraphsfv = { {a="ww", b="وّ"}, {a="yy", b="يّ"}, -- sukūn begin + --tmp: next line is added + {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])%-(%_?[uaiUAIY])", b="%1%2"}, {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])$", b="%1ْ"}, {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%s])", b="%1ْ%2"}, - {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%_]?[^%_uaiUAIًٌٍ])", b="%1ْ%2"}, + {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])%-(%_?[^uaiUAIًٌٍ])", b="%1ْ%2"}, -- take out sukūn in cases of assimilation {a="(n)(ْ)(%s)([روي])", b="%1%3%4"}, {a="(n)(ْ)(%s)([ل])", b="%1%3%4"}, @@ -474,6 +496,18 @@ digraphsfv = { } digraphsfveasy = { -- see the diffenrences under 'easy' marker below + -- iʿrāb: straight double quote must be discarded + {a="(%-)(\"?[UI]na)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?[UI]na)(%p?)$", b="%2%3"}, + {a="(%-)(\"?At[ui])(%p?%s)", b="%2%3"}, + {a="(%-)(\"?At[ui])(%p?)$", b="%2%3"}, + {a="(%-)(\"?Ani)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?Ani)(%p?)$", b="%2%3"}, + {a="(%-)(\"?ayni)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?ayni)(%p?)$", b="%2%3"}, + {a="(%-)(\"?[uai])(%p?%s)", b="%2%3"}, + {a="(%-)(\"?[uai])(%p?)$", b="%2%3"}, + -- ʾiʿrāb (end) -- initial straight double quote gives a connective ʾalif {a="^\"[uai]", b="ٱ"}, {a="([%s%-])\"[uai]", b="%1ٱ"}, @@ -524,6 +558,8 @@ digraphsfveasy = { -- see the diffenrences under 'easy' marker below -- first take out every previously generated sukūn by hamza rules, -- so there be no need to edit them: {a="ْ", b=""}, + --tmp: next line is added +-- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])%-([uai])", b="%1%2"}, -- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])$", b="%1ْ"}, -- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%s])", b="%1ْ%2"}, -- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%_]?[^%_uaiUAIًٌٍ])", b="%1ْ%2"}, -- cgit v1.2.3