From 076643c4e1daa62c1611a963984c54620707fa2e Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 8 Dec 2009 07:32:46 +0000 Subject: [PATCH] making Arabic minimal compile; strange chars remain --- lib/src/api/Constructors.gf | 8 ++++---- lib/src/arabic/MorphoAra.gf | 6 +++--- lib/src/arabic/ParadigmsAra.gf | 2 +- src/GF/Text/Transliterations.hs | 5 +++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/src/api/Constructors.gf b/lib/src/api/Constructors.gf index 923f0e28f..a4396cb09 100644 --- a/lib/src/api/Constructors.gf +++ b/lib/src/api/Constructors.gf @@ -1789,7 +1789,7 @@ incomplete resource Constructors = open Grammar in { -- numerals from strings -oper +oper --# notminimal str2ord : Str -> Ord = \s -> case Predef.lessInt (Predef.length s) 7 of { Predef.PTrue => OrdNumeral (str2numeral s) ; Predef.PFalse => OrdDigits (str2digits s) @@ -1802,9 +1802,9 @@ oper str2numeral : Str -> Numeral = (\s -> case s of { m@(? + _) + "000" => num (pot3 (s2s1000 m)) ; - m@(? + _) + "00" + n@? => num (pot3plus (s2s1000 m) (s2s1000 n)) ; - m@(? + _) + "0" + n@(? + ?) => num (pot3plus (s2s1000 m) (s2s1000 n)) ; - m@(? + _) + n@(? + ? + ?) => num (pot3plus (s2s1000 m) (s2s1000 n)) ; + m@(? + _) + "00" + n@? => num (pot3plus (s2s1000 m) (s2s1000 n)) ; --# notminimal + m@(? + _) + "0" + n@(? + ?) => num (pot3plus (s2s1000 m) (s2s1000 n)) ; --# notminimal + m@(? + _) + n@(? + ? + ?) => num (pot3plus (s2s1000 m) (s2s1000 n)) ; --# notminimal _ => num (pot2as3 (s2s1000 s)) }) where { diff --git a/lib/src/arabic/MorphoAra.gf b/lib/src/arabic/MorphoAra.gf index 8846e11a6..a6c2267d2 100644 --- a/lib/src/arabic/MorphoAra.gf +++ b/lib/src/arabic/MorphoAra.gf @@ -41,9 +41,9 @@ flags optimize = all ;--noexpand; coding=utf8 ; vowel : Case => Str = table { - Nom => "ُ"; - Acc => "َ"; - Gen => "ِ" + Nom => "ُ"; + Acc => "َ"; + Gen => "ِ" }; } diff --git a/lib/src/arabic/ParadigmsAra.gf b/lib/src/arabic/ParadigmsAra.gf index 9e9a1c598..75cccff5b 100644 --- a/lib/src/arabic/ParadigmsAra.gf +++ b/lib/src/arabic/ParadigmsAra.gf @@ -355,7 +355,7 @@ resource ParadigmsAra = open -- e.g. al-jamii3, 2a7ad regNP : Str -> Number -> NP = \word,n -> - { s = \\c => word + vowel ! c ; + { s = \\c => word ++ vowel ! c ; ---- gives strange chars a = {pgn = Per3 Masc n; isPron = False }; lock_NP = <> }; diff --git a/src/GF/Text/Transliterations.hs b/src/GF/Text/Transliterations.hs index 1e7cc8492..e2747f506 100644 --- a/src/GF/Text/Transliterations.hs +++ b/src/GF/Text/Transliterations.hs @@ -130,9 +130,10 @@ transArabic = mkTransliteration "Arabic" allTrans allCodes where " V A: A? w? A- y? A b t. t v g H K d " ++ -- 0621 - 062f "W r z s C S D T Z c G " ++ -- 0630 - 063a " f q k l m n h w y. y a. u. i. a u " ++ -- 0641 - 064f - "i v2 o a: V+ V- i: a+" -- 0650 - 0657 + "i v2 o a: V+ V- i: a+ " ++ -- 0650 - 0657 + "A* " -- 0671 (used by AED) allCodes = [0x0621..0x062f] ++ [0x0630..0x063a] ++ - [0x0641..0x064f] ++ [0x0650..0x0657] + [0x0641..0x064f] ++ [0x0650..0x0657] ++ [0x0671] transPersian :: Transliteration transPersian = (mkTransliteration "Persian/Farsi" allTrans allCodes)