From: Laurent Mazet Date: Sun, 7 Jun 2020 20:33:46 +0000 (+0200) Subject: add English dictionnary X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=b496e5666637fe94972e352d36d8075a613d05b4;p=trivabble.git add English dictionnary --- diff --git a/dict-dists-extractor/Makefile b/dict-dists-extractor/Makefile index c51ca26..9cdb61b 100644 --- a/dict-dists-extractor/Makefile +++ b/dict-dists-extractor/Makefile @@ -7,7 +7,25 @@ all: $(ROOT_DICT): mkdir $(ROOT_DICT) -$(ROOT_DICT)/fr.json: /usr/share/dict/french +$(ROOT_DICT)/en.json: /usr/share/dict/american-english Makefile + cat $< | \ + grep -v '^.$$' | \ + grep -v "[.'-]" | \ + sed -e 's/[áâàäå]/a/g' \ + -e 's/[ç]/c/g' \ + -e 's/[éêè]/e/g' \ + -e 's/[íî]/i/g' \ + -e 's/[ñ]/n/g' \ + -e 's/[óôö]/o/g' \ + -e 's/[ûü]/u/g' | \ + tr '[a-z]' '[A-Z]' | \ + sort | \ + uniq | \ + awk 'BEGIN { print "[" } \ + { print " \"" $$0 "\"," } \ + END { print " \"\"\n]" }' > $@ + +$(ROOT_DICT)/fr.json: /usr/share/dict/french Makefile cat $< | \ grep -v '^.$$' | \ grep -v "[.'-]" | \