mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-24 10:22:50 -06:00
added a slot for Urdu in Text.Transliterations
This commit is contained in:
@@ -27,6 +27,7 @@ transliteration :: String -> Maybe Transliteration
|
|||||||
transliteration s = case s of
|
transliteration s = case s of
|
||||||
"devanagari" -> Just transDevanagari
|
"devanagari" -> Just transDevanagari
|
||||||
"thai" -> Just transThai
|
"thai" -> Just transThai
|
||||||
|
"urdu" -> Just transUrdu
|
||||||
_ -> Nothing
|
_ -> Nothing
|
||||||
|
|
||||||
characterTable :: Transliteration -> String
|
characterTable :: Transliteration -> String
|
||||||
@@ -85,13 +86,20 @@ transThai = mkTransliteration allTrans allCodes where
|
|||||||
allCodes = [0x0e00 .. 0x0e7f]
|
allCodes = [0x0e00 .. 0x0e7f]
|
||||||
|
|
||||||
transDevanagari :: Transliteration
|
transDevanagari :: Transliteration
|
||||||
transDevanagari = (mkTransliteration allTrans allCodes){invisible_chars = ["a"]} where
|
transDevanagari =
|
||||||
allTrans = words $
|
(mkTransliteration allTransUrduHindi allCodes){invisible_chars = ["a"]} where
|
||||||
|
allCodes = [0x0901 .. 0x094c]
|
||||||
|
|
||||||
|
allTransUrduHindi = words $
|
||||||
"M N - - " ++
|
"M N - - " ++
|
||||||
"a- A- i- I- u- U- R- - - - e- E- - - o- O- " ++
|
"a- A- i- I- u- U- R- - - - e- E- - - o- O- " ++
|
||||||
"k K g G N: c C j J n: t. T. d. D. n. t " ++
|
"k K g G N: c C j J n: t. T. d. D. n. t " ++
|
||||||
"T d D n - p P b B m y r - l - - v " ++
|
"T d D n - p P b B m y r - l - - v " ++
|
||||||
"S s. s h - - r. - A i I u U R - - " ++
|
"S s. s h - - r. - A i I u U R - - " ++
|
||||||
"- e E o O "
|
"- e E o O "
|
||||||
|
|
||||||
|
transUrdu :: Transliteration
|
||||||
|
transUrdu =
|
||||||
|
(mkTransliteration allTransUrduHindi allCodes){invisible_chars = ["a"]} where
|
||||||
allCodes = [0x0901 .. 0x094c]
|
allCodes = [0x0901 .. 0x094c]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user