add Finnish dictionary
authorLaurent Mazet <mazet@softndesign.org>
Mon, 15 Jun 2020 21:29:06 +0000 (23:29 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Mon, 15 Jun 2020 21:29:06 +0000 (23:29 +0200)
dict-dists-extractor/Makefile

index 1d64d7b5b4b7c7a95a7ea3c61fa0872c1e52b30d..c5ba66db46af8424cf08ee664d17f6a7acbe0335 100644 (file)
@@ -2,8 +2,8 @@
 
 ROOT_DICT = ../public/dict
 
-LANGS = bg br ca cy da de el en eo es et fr it nl no pl pt sv uk
-# to add: ar cs fi? ga he hr hu hy is lv ro ru sk sl
+LANGS = bg br ca cy da de el en eo es et fi fr it nl no pl pt sv uk
+# to add: ar cs 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
@@ -233,6 +233,15 @@ $(ROOT_DICT)/et.dict: et.low $(DEPEND)
         sort | \
         uniq > $@
 
+$(ROOT_DICT)/fi.dict: fi.low $(DEPEND)
+       echo Building $@ from $<
+       cat $< | \
+        grep -v '^.$$' | \
+               grep -v "[.':-]" | \
+        tr '[a-zäåöšž]' '[A-ZÄÅÖŠŽ]' | \
+        sort | \
+        uniq > $@
+
 $(ROOT_DICT)/fr.dict: fr.low $(DEPEND)
        echo Building $@ from $<
        cat $< | \
@@ -380,6 +389,9 @@ check-es:$(ROOT_DICT)/es.dict
 check-et:$(ROOT_DICT)/et.dict
        $(call CHECKER,$<,ABCDEFGHIJKLMNOPRSTUVYZÄÖÕÜŠŽ,~)
 
+check-fi:$(ROOT_DICT)/fi.dict
+       $(call CHECKER,$<,ABCDEFGHIJKLMNOPQRSTUVWXYZÄÅÖŠŽ,~)
+
 check-no:$(ROOT_DICT)/no.dict
        $(call CHECKER,$<,ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ,~)