error on Hebrew dictionary and limit dictionary to 50MB (uncompressed)
authorLaurent Mazet <mazet@softndesign.org>
Thu, 18 Jun 2020 20:55:12 +0000 (22:55 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Thu, 18 Jun 2020 20:55:12 +0000 (22:55 +0200)
dict-dists-extractor/Makefile

index d47f0c9817dca111f37da19ba0516e36ea409f44..b33612f827d42ad563ea969f45ef4564e17303ee 100644 (file)
@@ -2,10 +2,16 @@
 
 ROOT_DICT = ../public/dict
 
-LANGS = ar bg br ca cs cy da de el en eo es et fi fr ga hr hy is it lv nl no pl pt ro ru sk sl sv uk
-# to add: ar he hu
-# hu: too big
-#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
+# 0MB < dictionary size < 10MB
+SMALL = br ca cy da de en es fr ga hr hu hy is lv nl no pt sv
+# 10MB < Dictionary size < 50MB
+LARGE = bg el eo it pl ro ru sk sl uk
+# 50MB < dictionary size < 500MB
+VERY_LARGE = ar cs et fi
+LANGS = $(SMALL) $(LARGE)
+
+# he and hu: can not be generated
+# af eu la ms tr xk: no aspell dictionary
 
 ASPDICT = https://ftp.gnu.org/gnu/aspell/dict/0index.html
 
@@ -299,6 +305,14 @@ $(ROOT_DICT)/ga.dict: ga.low $(DEPEND)
         sort | \
         uniq > $@
 
+$(ROOT_DICT)/he.dict: he.low $(DEPEND)
+       echo Building $@ from $<
+       cat $< | \
+        grep -v '^.$$' | \
+        grep -v "['-]" | \
+               sort | \
+               uniq > $@
+
 $(ROOT_DICT)/hr.dict: hr.low $(DEPEND)
        echo Building $@ from $<
        cat $< | \
@@ -558,6 +572,9 @@ check-fi:$(ROOT_DICT)/fi.dict
 check-ga:$(ROOT_DICT)/ga.dict
        $(call CHECKER,$<,ABCDEFGHIJKLMNOPQRSTUVWXYZÑ,~)
 
+check-he:$(ROOT_DICT)/he.dict
+       $(call CHECKER,$<,אבגדהוזחטיכלמנסעפצקרשת,~)
+
 check-hr:$(ROOT_DICT)/hr.dict
        $(call CHECKER,$<,ABCDEFGHIJKLMNOPQRSTUVWXYZĆČĐŠŽ,~)