add Greek dictionary
authorLaurent Mazet <mazet@softndesign.org>
Mon, 15 Jun 2020 20:19:44 +0000 (22:19 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Mon, 15 Jun 2020 20:19:44 +0000 (22:19 +0200)
dict-dists-extractor/Makefile

index 7ac4a2879f1ef2d9120667db32cae0e8126b7b09..1ccc1ee21e42d4b074725d8f9a2769277ac85f83 100644 (file)
@@ -2,8 +2,8 @@
 
 ROOT_DICT = ../public/dict
 
-LANGS = bg br ca cy da de en eo es fr it nl no pl pt sv uk
-# to add: ar cs cy el et eu fi? ga he hr hu hy is lv ro ru sk sl
+LANGS = bg br ca cy da de el en eo es fr it nl no pl pt sv uk
+# to add: ar cs et eu fi? ga he hr hu hy is lv ro ru sk sl
 #LANGS = af ar bg br ca cs cy da de el en eo es et eu fi fr ga he hr hu hy is it la lv ms nl no pl pt ro ru sk sl sv tr uk xk
 
 ASPDICT = https://ftp.gnu.org/gnu/aspell/dict/0index.html
@@ -26,7 +26,6 @@ count:
 
 low: $(LOWS)
 
-
 src.mk:
        echo Creation language table
        wget $(ASPDICT) -q -O - | \
@@ -167,6 +166,25 @@ $(ROOT_DICT)/de.dict: de.low $(DEPEND)
         sort | \
         uniq > $@
 
+$(ROOT_DICT)/el.dict: el.low $(DEPEND)
+       echo Building $@ from $<
+       cat $< | \
+        grep -v '^.$$' | \
+        grep -v "['-]" | \
+        sed -e 's/[άΆ]/α/g' \
+                   -e 's/[ϐ]/β/g' \
+            -e 's/[έΈ]/ε/g' \
+            -e 's/[ήΉ]/η/g' \
+            -e 's/[ίϊΐΊ]/ι/g' \
+            -e 's/[όΌ]/ο/g' \
+            -e 's/[ς]/σ/g' \
+            -e 's/[ΰϋύΎ]/υ/g' \
+            -e 's/[ϕ]/φ/g' \
+            -e 's/[ώΏ]/ω/g' | \
+               tr '[αβγδεζηθικλμνξοπρστυφχψω]' '[ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ]' | \
+               sort | \
+               uniq > $@
+
 $(ROOT_DICT)/en.dict: en.low $(DEPEND)
        echo Building $@ from $<
        cat $< | \
@@ -341,6 +359,9 @@ check-da:$(ROOT_DICT)/da.dict
 check-de:$(ROOT_DICT)/de.dict
        $(call CHECKER,$<,ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ,~)
 
+check-el:$(ROOT_DICT)/el.dict
+       $(call CHECKER,$<,ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ,~)
+
 check-eo:$(ROOT_DICT)/eo.dict
        $(call CHECKER,$<,ABCDEFGHIJKLMNOPQRSTUVWXYZĈĜĤĴŜŬ,~)