add Armenian dictionary
authorLaurent Mazet <mazet@softndesign.org>
Tue, 16 Jun 2020 20:37:40 +0000 (22:37 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Tue, 16 Jun 2020 20:37:40 +0000 (22:37 +0200)
dict-dists-extractor/Makefile

index ef2fe3309a9cd68c0acdfed231c21141a476b49f..49184a9c96000b1762aeecb187bb98348d56f9e3 100644 (file)
@@ -2,8 +2,8 @@
 
 ROOT_DICT = ../public/dict
 
-LANGS = bg br ca cy da de el en eo es et fi fr ga hr it nl no pl pt sv uk
-# to add: ar cs he hu hy is lv ro ru sk sl
+LANGS = bg br ca cy da de el en eo es et fi fr ga hr hy it nl no pl pt sv uk
+# to add: ar cs he hu is lv ro ru sk sl
 # cs: bug
 # 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
@@ -293,6 +293,23 @@ $(ROOT_DICT)/hu.dict: hu.low $(DEPEND)
                sort | \
                uniq > $@
 
+#grep -v "['ԁԃԂԃ-]"
+$(ROOT_DICT)/hy.dict: hy.low $(DEPEND)
+       echo Building $@ from $<
+       cat $< | \
+        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' \
+            -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' \
+            -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' \
+            -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" | \
+        sort | \
+        uniq > $@
+
 $(ROOT_DICT)/it.dict: it.low $(DEPEND)
        echo Building $@ from $<
        cat $< | \
@@ -437,6 +454,9 @@ check-hr:$(ROOT_DICT)/hr.dict
 check-hu:$(ROOT_DICT)/hu.dict
        $(call CHECKER,$<,ABCDEFGHIJKLMNOPQRSTUVWXYZÁÉÓÖŐÚÜŰ,~)
 
+check-hy:$(ROOT_DICT)/hy.dict
+       $(call CHECKER,$<,ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖՈՒև,~)
+
 check-no:$(ROOT_DICT)/no.dict
        $(call CHECKER,$<,ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ,~)