1
0
forked from GitHub/gf-core

Greek (modern) transliteration scheme

This commit is contained in:
aarne
2009-03-17 22:04:20 +00:00
parent 98019dda53
commit 8eeb6ae89e
2 changed files with 15 additions and 1 deletions

View File

@@ -522,6 +522,7 @@ allCommands cod env@(pgf, mos) = Map.fromList [
return $ fromString out,
options = [
("arabic", "Arabic"),
("greek", "Greek (modern)"),
("devanagari","Devanagari"),
("telugu", "Telugu"),
("thai", "Thai")
@@ -681,7 +682,8 @@ stringOpOptions = [
("from_cp1251","decode from cp1251 (Cyrillic used in Bulgarian resource)"),
("from_arabic","from unicode to GF Arabic transliteration"),
("from_devanagari","from unicode to GF Devanagari transliteration"),
("from_thai","from unicode to GF Telugu transliteration"),
("from_greek","from unicode to GF modern Greek transliteration"),
("from_telugu","from unicode to GF Telugu transliteration"),
("from_thai","from unicode to GF Thai transliteration"),
("from_utf8","decode from utf8 (default)"),
("lextext","text-like lexer"),
@@ -690,6 +692,7 @@ stringOpOptions = [
("to_cp1251","encode to cp1251 (Cyrillic used in Bulgarian resource)"),
("to_arabic","from GF Arabic transliteration to unicode"),
("to_devanagari","from GF Devanagari transliteration to unicode"),
("to_greek","from GF modern Greek transliteration to unicode"),
("to_html","wrap in a html file with linebreaks"),
("to_telugu","from GF Telugu transliteration to unicode"),
("to_thai","from GF Thai transliteration to unicode"),

View File

@@ -28,6 +28,7 @@ transliteration :: String -> Maybe Transliteration
transliteration s = case s of
"arabic" -> Just transArabic
"devanagari" -> Just transDevanagari
"greek" -> Just transGreek
"telugu" -> Just transTelugu
"thai" -> Just transThai
---- "urdu" -> Just transUrdu
@@ -128,3 +129,13 @@ transTelugu = mkTransliteration allTrans allCodes where
"R+ L+ l+ l* - - n0 n1 n2 n3 n4 n5 n6 n7 n8 n9 "
allCodes = [0x0c00 .. 0x0c7f]
transGreek :: Transliteration
transGreek = mkTransliteration allTrans allCodes where
allTrans = words $
"- - - - - - A' - E' H' I' - O' - Y' W' " ++
"i= A B G D E Z H V I K L M N X O " ++
"P R - S T Y F C Q W I- Y- a' e' h' i' " ++
"y= a b g d e z h v i k l m n x o " ++
"p r s* s t y f c q w i- y- o' y' w' - "
allCodes = [0x0380 .. 0x03cf]