Word lists and other weird stuff

2011-08-20 23:24:52

Imagine you want to check for the German words with the most occurrences of the letters u,f,s.

No, you may not ask why.

aptitude install aspell-de
cp /usr/share/aspell/de-common.cwl.gz .
gzip -d de-common.cwl.gz
preunzip de-common.cwl
sort --unique --ignore-case de-common.wl > list.txt
iconv -f ISO8859-1 -t UTF-8 list.txt > ulist.txt
cut -d'/' -f1 ulist.txt > slist.txt
cat slist.txt | tr '[A-Z]' '[a-z]'  > llist.txt
perl -ne 'chomp; $x = tr/[ufs]//;$y = $_; $y =~ s/[ufs]/@/g; print $x," ",$_," ",$y,"\n";' llist.txt | sort -rn | head

11 wissenschaftsausschuss wi@@en@cha@t@a@@@ch@@@
11 verfassungsausschuss ver@a@@@ng@a@@@ch@@@
11 untersuchungsausschuss @nter@@ch@ng@a@@@ch@@@
10 bundesausbildungsförderungsgesetz b@nde@a@@bild@ng@@örder@ng@ge@etz
9 wissensrepräsentationsformalismus wi@@en@reprä@entation@@ormali@m@@
9 wirtschaftsprüfungsgesellschaft wirt@cha@t@prü@@ng@ge@ell@cha@t
9 wirtschaftsauffassung wirt@cha@t@a@@@a@@@ng
9 systemfunktionsaufruf @y@tem@@nktion@a@@r@@
9 schlichtungsausschuss @chlicht@ng@a@@@ch@@@
9 prüfungsausschuss prü@@ng@a@@@ch@@@

About

Life's a bitch, life's a whore. Nothing less, nothing more.

Read More