add Romanian dictionary
authorLaurent Mazet <mazet@softndesign.org>
Tue, 16 Jun 2020 21:44:52 +0000 (23:44 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Tue, 16 Jun 2020 21:44:52 +0000 (23:44 +0200)
dict-dists-extractor/Makefile

index 7307896fdae874a82bcade6842719c64bfee0e58..1c06e3e65c1e8947e80b110d00fe6286562a0254 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 hy is it lv nl no pl pt sv uk
-# to add: ar cs he hu ro ru sk sl
+LANGS = bg br ca cy da de el en eo es et fi fr ga hr hy is it lv nl no pl pt ro sv uk
+# to add: ar cs he hu 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
@@ -405,6 +405,21 @@ $(ROOT_DICT)/pt.dict: pt.low $(DEPEND)
         sort | \
         uniq > $@
 
+$(ROOT_DICT)/ro.dict: ro.low $(DEPEND)
+       echo Building $@ from $<
+       cat $< | \
+        grep -v '^.$$' | \
+        grep -v "['-]" | \
+               sed -e 's/[áâăÂĂ]/a/g' \
+            -e 's/[éè]/e/g' \
+            -e 's/[íîÎ]/i/g' \
+            -e 's/[șȘ]/s/g' \
+            -e 's/[țȚ]/t/g' \
+            -e 's/[ü]/u/g' | \
+        tr '[a-z]' '[A-Z]' | \
+        sort | \
+        uniq > $@
+
 $(ROOT_DICT)/sv.dict: sv.low $(DEPEND)
        echo Building $@ from $<
        cat $< | \