summaryrefslogtreecommitdiff
path: root/indexing/hsindex/src/HsIndex/CharLists
diff options
context:
space:
mode:
Diffstat (limited to 'indexing/hsindex/src/HsIndex/CharLists')
-rw-r--r--indexing/hsindex/src/HsIndex/CharLists/English.hs34
-rw-r--r--indexing/hsindex/src/HsIndex/CharLists/French.hs108
-rw-r--r--indexing/hsindex/src/HsIndex/CharLists/German.hs76
-rw-r--r--indexing/hsindex/src/HsIndex/CharLists/Russian.hs73
-rw-r--r--indexing/hsindex/src/HsIndex/CharLists/SubsIEC.hs128
-rw-r--r--indexing/hsindex/src/HsIndex/CharLists/Symbols.hs30
6 files changed, 449 insertions, 0 deletions
diff --git a/indexing/hsindex/src/HsIndex/CharLists/English.hs b/indexing/hsindex/src/HsIndex/CharLists/English.hs
new file mode 100644
index 0000000000..27adf8186e
--- /dev/null
+++ b/indexing/hsindex/src/HsIndex/CharLists/English.hs
@@ -0,0 +1,34 @@
+-- |
+-- Module : HsIndex.CharLists.English
+-- Copyright : Jean-Luc JOULIN 2018-2019
+-- License : General Public Licence (GPLv3)
+-- Maintainer : Jean-Luc JOULIN <jean-luc-joulin@orange.fr>
+-- Stability : alpha
+-- Portability : portable
+-- The letters, numbers and symbol definition for the english language.
+
+
+module HsIndex.CharLists.English where
+
+import HsIndex.Types
+import HsIndex.Functions
+import HsIndex.CharLists.Symbols
+import HsIndex.CharLists.French
+
+
+
+ordEnglish = lstLatinLetter
+
+ordEnglishUpperLower = upperLower lstLatinLetter
+
+
+-- |
+langDefEnglish :: LangDef
+langDefEnglish = LangDef
+ { lstLetters = lstSpace ++ ordEnglishUpperLower
+ , lstNumbers = lstDigit
+ , lstSymbols = Nothing
+ , lstSubs = subsFrenchUpperLower++subsSymb
+ , lstSecOrder = [Symbols, Numbers, Letters]
+ }
+
diff --git a/indexing/hsindex/src/HsIndex/CharLists/French.hs b/indexing/hsindex/src/HsIndex/CharLists/French.hs
new file mode 100644
index 0000000000..a2b54e0a54
--- /dev/null
+++ b/indexing/hsindex/src/HsIndex/CharLists/French.hs
@@ -0,0 +1,108 @@
+-- |
+-- Module : HsIndex.CharLists.French
+-- Copyright : Jean-Luc JOULIN 2018-2019
+-- License : General Public Licence (GPLv3)
+-- Maintainer : Jean-Luc JOULIN <jean-luc-joulin@orange.fr>
+-- Stability : alpha
+-- Portability : portable
+-- The letters, numbers and symbol definition for the french language.
+
+
+module HsIndex.CharLists.French where
+
+import HsIndex.Functions
+import HsIndex.CharLists.Symbols
+import HsIndex.Types
+
+lstSubsLatin = take 1
+
+
+ordFrench = lstLatinLetter
+
+ordFrenchUpperLower = upperLower lstLatinLetter
+
+
+
+
+lstLatinLetter =
+ [ 'a'
+ , 'b'
+ , 'c'
+ , 'd'
+ , 'e'
+ , 'f'
+ , 'g'
+ , 'h'
+ , 'i'
+ , 'j'
+ , 'k'
+ , 'l'
+ , 'm'
+ , 'n'
+ , 'o'
+ , 'p'
+ , 'q'
+ , 'r'
+ , 's'
+ , 't'
+ , 'u'
+ , 'v'
+ , 'w'
+ , 'x'
+ , 'y'
+ , 'z'
+ ]
+
+
+subsFrenchUpperLower = replaUpperLower subsFrench
+
+
+
+
+subsFrench =
+ [ ('à', "a")
+ , ('â', "a")
+ , ('å', "a")
+ , ('ä', "a")
+
+ , ('ç', "c")
+
+ , ('é', "e")
+ , ('è', "e")
+ , ('ê', "e")
+ , ('ë', "e")
+
+ , ('î', "i")
+ , ('ï', "i")
+
+ , ('ô', "o")
+ , ('ö', "o")
+
+ , ('ù', "u")
+ , ('û', "u")
+ , ('ü', "u")
+
+
+ , ('æ', "ae")
+ , ('œ', "oe")
+ ]
+
+
+subsSymb =
+ [ ('-', " ")
+ , ('_', " ")
+ , ('\\', " ")
+ ]
+
+
+
+langDefFrench = LangDef
+ { lstLetters = lstSpace ++ ordFrenchUpperLower -- ++ (map substituted subsFrenchUpperLower)
+ , lstNumbers = lstDigit
+ , lstSymbols = Nothing
+ , lstSubs = subsFrenchUpperLower++subsSymb
+ , lstSecOrder = [Symbols, Numbers, Letters]
+ }
+
+
+
diff --git a/indexing/hsindex/src/HsIndex/CharLists/German.hs b/indexing/hsindex/src/HsIndex/CharLists/German.hs
new file mode 100644
index 0000000000..cb7df65686
--- /dev/null
+++ b/indexing/hsindex/src/HsIndex/CharLists/German.hs
@@ -0,0 +1,76 @@
+-- |
+-- Module : HsIndex.CharLists.German
+-- Copyright : Jean-Luc JOULIN 2018-2019
+-- License : General Public Licence (GPLv3)
+-- Maintainer : Jean-Luc JOULIN <jean-luc-joulin@orange.fr>
+-- Stability : alpha
+-- Portability : portable
+-- The letters, numbers and symbol definition for the german language.
+
+
+module HsIndex.CharLists.German where
+
+
+import HsIndex.Functions
+import HsIndex.Types
+import HsIndex.CharLists.Symbols
+import HsIndex.CharLists.French ( lstLatinLetter )
+
+
+
+ordGerman = lstLatinLetter
+
+ordGermanLowerUpper = lowerUpper lstLatinLetter
+
+lstGermanLetter =
+ [ 'a'
+ , 'b'
+ , 'c'
+ , 'd'
+ , 'e'
+ , 'f'
+ , 'g'
+ , 'h'
+ , 'i'
+ , 'j'
+ , 'k'
+ , 'l'
+ , 'm'
+ , 'n'
+ , 'o'
+ , 'p'
+ , 'q'
+ , 'r'
+ , 's'
+ , 'ß'
+ , 't'
+ , 'u'
+ , 'v'
+ , 'w'
+ , 'x'
+ , 'y'
+ , 'z'
+ ]
+
+
+charSubsGerman =
+ [ ('æ', "ae")
+ , ('ä', "a")
+ , ('ö', "o")
+ , ('ß', "ss")
+ , ('ü', "u")
+ ]
+
+
+
+
+langDefGerman = LangDef
+ { lstLetters = lstSpace ++ ordGermanLowerUpper -- ++ map substituted charSubsGerman
+ , lstNumbers = lstDigit
+ , lstSymbols = Nothing
+ , lstSubs = charSubsGerman
+ , lstSecOrder = [Symbols, Letters, Numbers]
+ }
+
+
+
diff --git a/indexing/hsindex/src/HsIndex/CharLists/Russian.hs b/indexing/hsindex/src/HsIndex/CharLists/Russian.hs
new file mode 100644
index 0000000000..1e9c3c96dc
--- /dev/null
+++ b/indexing/hsindex/src/HsIndex/CharLists/Russian.hs
@@ -0,0 +1,73 @@
+-- |
+-- Module : HsIndex.CharLists.Russian
+-- Copyright : Jean-Luc JOULIN 2018-2019
+-- License : General Public Licence (GPLv3)
+-- Maintainer : Jean-Luc JOULIN <jean-luc-joulin@orange.fr>
+-- Stability : alpha
+-- Portability : portable
+-- The letters, numbers and symbol definition for the russian language.
+
+
+module HsIndex.CharLists.Russian where
+
+import HsIndex.Functions
+import HsIndex.Types
+import HsIndex.CharLists.Symbols
+
+ordRussian = lstCyrillic
+
+ordRussianUpperLower = upperLower lstCyrillic
+
+-- | List of cyrillic characters.
+lstCyrillic =
+ [ 'а'
+ , 'б'
+ , 'в'
+ , 'г'
+ , 'д'
+ , 'е'
+ , 'ё'
+ , 'ж'
+ , 'з'
+ , 'и'
+ , 'й'
+ , 'к'
+ , 'л'
+ , 'м'
+ , 'н'
+ , 'о'
+ , 'п'
+ , 'р'
+ , 'с'
+ , 'т'
+ , 'у'
+ , 'ф'
+ , 'х'
+ , 'ц'
+ , 'ч'
+ , 'ш'
+ , 'щ'
+ , 'ъ'
+ , 'ы'
+ , 'ь'
+ , 'э'
+ , 'ю'
+ , 'я'
+ ]
+
+
+
+
+
+lettersRussian = lstCyrillic
+
+langDefRussian = LangDef
+ { lstLetters = lstSpace ++ ordRussianUpperLower
+ , lstNumbers = lstDigit
+ , lstSymbols = Nothing
+ , lstSubs = []
+ , lstSecOrder = [Symbols, Numbers, Letters]
+ }
+
+
+
diff --git a/indexing/hsindex/src/HsIndex/CharLists/SubsIEC.hs b/indexing/hsindex/src/HsIndex/CharLists/SubsIEC.hs
new file mode 100644
index 0000000000..33813a6ce8
--- /dev/null
+++ b/indexing/hsindex/src/HsIndex/CharLists/SubsIEC.hs
@@ -0,0 +1,128 @@
+-- |
+-- Module : HsIndex.CharLists.SubsIEC
+-- Copyright : Jean-Luc JOULIN 2018-2019
+-- License : General Public Licence (GPLv3)
+-- Maintainer : Jean-Luc JOULIN <jean-luc-joulin@orange.fr>
+-- Stability : alpha
+-- Portability : portable
+-- The list of imakeidx IEC substitution hard-coded for all languages.
+
+
+module HsIndex.CharLists.SubsIEC where
+
+
+-- | List of characters substitutions for parsing the 'imakeindex' output file.
+lstLaTeXSubs =
+ [ ("'e" , 'é')
+ , ("`e" , 'è')
+ , ("^e" , 'ê')
+ , ("\"e" , 'ë')
+ , ("`a" , 'à')
+ , ("^a" , 'â')
+ , ("\"a" , 'ä')
+ , ("\"\\i" , 'ï')
+ , ("^\\i " , 'î')
+ , ("^u" , 'û')
+ , ("\"u" , 'ü')
+ , ("^o" , 'ô')
+ , ("\"o" , 'ö')
+ , ("'E" , 'É')
+ , ("`E" , 'È')
+ , ("^E" , 'Ê')
+ , ("\"E" , 'Ë')
+ , ("`A" , 'À')
+ , ("^A" , 'Â')
+ , ("\"A" , 'Ä')
+ , ("\"\\I" , 'Ï')
+ , ("^\\I " , 'Î')
+ , ("^U" , 'Û')
+ , ("\"U" , 'Ü')
+ , ("^O" , 'Ô')
+ , ("\"O" , 'Ö')
+ , ("r a" , 'å')
+ , ("ae" , 'æ')
+ , ("oe" , 'œ')
+ , ("c c" , 'ç')
+ , ("ss" , 'ß')
+ , ("r A" , 'Å')
+ , ("AE" , 'Æ')
+ , ("OE" , 'Œ')
+ , ("cyra" , 'а')
+ , ("cyrb" , 'б')
+ , ("cyrv" , 'в')
+ , ("cyrg" , 'г')
+ , ("cyrd" , 'д')
+ , ("cyre" , 'е')
+ , ("cyryo" , 'ё')
+ , ("cyrzh" , 'ж')
+ , ("cyrz" , 'з')
+ , ("cyri" , 'и')
+ , ("cyrishrt", 'й')
+ , ("cyrk" , 'к')
+ , ("cyrl" , 'л')
+ , ("cyrm" , 'м')
+ , ("cyrn" , 'н')
+ , ("cyro" , 'о')
+ , ("cyrp" , 'п')
+ , ("cyrr" , 'р')
+ , ("cyrs" , 'с')
+ , ("cyrt" , 'т')
+ , ("cyru" , 'у')
+ , ("cyrf" , 'ф')
+ , ("cyrh" , 'х')
+ , ("cyrc" , 'ц')
+ , ("cyrch" , 'ч')
+ , ("cyrsh" , 'ш')
+ , ("cyrshch" , 'щ')
+ , ("cyrhrdsn", 'ъ')
+ , ("cyrery" , 'ы')
+ , ("cyrsftsn", 'ь')
+ , ("cyrerev" , 'э')
+ , ("cyryu" , 'ю')
+ , ("cyrya" , 'я')
+ , ("CYRA" , 'А')
+ , ("CYRB" , 'Б')
+ , ("CYRV" , 'В')
+ , ("CYRG" , 'Г')
+ , ("CYRD" , 'Д')
+ , ("CYRE" , 'Е')
+ , ("CYRYO" , 'Ё')
+ , ("CYRZH" , 'Ж')
+ , ("CYRZ" , 'З')
+ , ("CYRI" , 'И')
+ , ("CYRISHRT", 'Й')
+ , ("CYRK" , 'К')
+ , ("CYRL" , 'Л')
+ , ("CYRM" , 'М')
+ , ("CYRN" , 'Н')
+ , ("CYRO" , 'О')
+ , ("CYRP" , 'П')
+ , ("CYRR" , 'Р')
+ , ("CYRS" , 'С')
+ , ("CYRT" , 'Т')
+ , ("CYRU" , 'У')
+ , ("CYRF" , 'Ф')
+ , ("CYRH" , 'Х')
+ , ("CYRC" , 'Ц')
+ , ("CYRCH" , 'Ч')
+ , ("CYRSH" , 'Ш')
+ , ("CYRSHCH" , 'Щ')
+ , ("CYRHRDSN", 'Ъ')
+ , ("CYRERY" , 'Ы')
+ , ("CYRSFTSN", 'Ь')
+ , ("CYREREV" , 'Э')
+ , ("CYRYU" , 'Ю')
+ , ("CYRYA" , 'Я')
+
+
+ , ("textquoteleft" , '‘')
+ , ("textquoteright" , '’')
+ , ("nobreakspace" , ' ')
+
+
+ ]
+
+
+
+
+
diff --git a/indexing/hsindex/src/HsIndex/CharLists/Symbols.hs b/indexing/hsindex/src/HsIndex/CharLists/Symbols.hs
new file mode 100644
index 0000000000..813bacfbde
--- /dev/null
+++ b/indexing/hsindex/src/HsIndex/CharLists/Symbols.hs
@@ -0,0 +1,30 @@
+-- |
+-- Module : HsIndex.CharLists.Symbols
+-- Copyright : Jean-Luc JOULIN 2018-2019
+-- License : General Public Licence (GPLv3)
+-- Maintainer : Jean-Luc JOULIN <jean-luc-joulin@orange.fr>
+-- Stability : alpha
+-- Portability : portable
+-- The list of symbols for all languages.
+
+
+module HsIndex.CharLists.Symbols where
+
+
+-- | Allowed symbols.
+allowedSymb = " &~\"'()[]{}<>*+/`^#@°=$£µ%§:;.,?"
+
+-- | Forbidden symbols.
+--
+-- These symbols
+forbiddenSymb = "!|\n\r" -- "!|{}\n\r"
+
+-- | The hyphens symbols.
+lstHyph = "-_"
+
+-- | List of digits.
+lstDigit = "0123456789"
+
+lstSpace = " "
+
+