mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -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
|
||||
"devanagari" -> Just transDevanagari
|
||||
"thai" -> Just transThai
|
||||
"urdu" -> Just transUrdu
|
||||
_ -> Nothing
|
||||
|
||||
characterTable :: Transliteration -> String
|
||||
@@ -85,13 +86,20 @@ transThai = mkTransliteration allTrans allCodes where
|
||||
allCodes = [0x0e00 .. 0x0e7f]
|
||||
|
||||
transDevanagari :: Transliteration
|
||||
transDevanagari = (mkTransliteration allTrans allCodes){invisible_chars = ["a"]} where
|
||||
allTrans = words $
|
||||
transDevanagari =
|
||||
(mkTransliteration allTransUrduHindi allCodes){invisible_chars = ["a"]} where
|
||||
allCodes = [0x0901 .. 0x094c]
|
||||
|
||||
allTransUrduHindi = words $
|
||||
"M N - - " ++
|
||||
"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 " ++
|
||||
"T d D n - p P b B m y r - l - - v " ++
|
||||
"S s. s h - - r. - A i I u U R - - " ++
|
||||
"- e E o O "
|
||||
allCodes = [0x0901 .. 0x094c]
|
||||
|
||||
transUrdu :: Transliteration
|
||||
transUrdu =
|
||||
(mkTransliteration allTransUrduHindi allCodes){invisible_chars = ["a"]} where
|
||||
allCodes = [0x0901 .. 0x094c]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user