Bug 11927 - Add greek to word-phrase-utf.chr
authorFridolin Somers <fridolin.somers@biblibre.com>
Thu, 4 Dec 2014 14:20:29 +0000 (15:20 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 21 Jan 2015 13:59:11 +0000 (10:59 -0300)
Add greek support in word-phrase-utf.chr for searching in a Greek catalog (it can also contain latin records).

Developped in collaboration with Giannis Kourmoulis <ikourmou@lib.auth.gr>

Test plan :
- Install using CHR zebra indexing
- Index a greek catalog
- Look for results with mixed uppercase, lowercase and diacritics in title

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
etc/zebradb/etc/word-phrase-utf.chr

index b773db8..6ef8952 100644 (file)
@@ -1,12 +1,12 @@
-# Generic search equivanence character map for Latin languages (English, French, etc.)
+# Generic character map for Latin and Greek characters.
 
 # Define the basic value-set. *Beware* of changing this without re-indexing
 # your databases.
 encoding utf-8
 
 # basic character set
-lowercase {0-9}{a-z}
-uppercase {0-9}{A-Z}
+lowercase {0-9}{a-z}αβγδεζηθικλμνξοπρστυφχψω
+uppercase {0-9}{A-Z}ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ
 
 # Breaking characters
 space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~’{\x88-\x89}{\x98-\x9C}
@@ -26,6 +26,14 @@ equivalent ëē(ee)
 equivalent oóòõôŏǫȯőǒȍȏ
 equivalent Œœöø(oe)
 equivalent ō(oo)
+equivalent αάΑΆ(α΄)(Α΄)
+equivalent εέΕΈ(ε΄)(Ε΄)
+equivalent ιίϊΙΊΪ(ι΄)(Ι΄)
+equivalent ηήΗΉ(η΄)(Η΄)
+equivalent οόΟΌ(ο΄)(Ο΄)
+equivalent υύϋΥΎΫ(υ΄)(Υ΄)
+equivalent ωώΩΏ(ω΄)(Ω΄)
+equivalent Σσς
 
 # Supplemental mappings
 # mapping diacritics to plain ASCII
@@ -284,6 +292,24 @@ map Ý                     y
 map ɏ                 y
 map Ɏ                 y
 
+## mapping diacritics to plain on greek characters
+map ά           α
+map Ά           α
+map έ           ε
+map Έ           ε
+map ί           ι
+map Ί           ι
+map ή           η
+map Ή           η
+map ό           ο
+map Ό           ο
+map ύ           υ
+map Ύ           υ
+map ώ           ω
+map Ώ           ω
+map Σ           σ
+map Σ           ς
+
 # mapping blank string
 map (^impr\s)       @
 map (^impr\.)       @