docs/bib-ref2

annotate stuff/wordfreq @ 61:0f2510fa7d98

Some more minor cleanups in the text. Already done on 2014-11-05 and thus part of the PB publication.
author markus schnalke <meillo@marmaro.de>
date Fri, 21 Nov 2014 08:50:55 +0100
parents
children
rev   line source
meillo@57 1 #!/bin/sh
meillo@57 2 #
meillo@57 3 # print word frequency
meillo@57 4
meillo@57 5 deroff "$@" |
meillo@57 6 tr -c 'A-Za-zÄÖÜäöüß-' '\n' | tr A-ZÄÖÜ a-zäöü |
meillo@57 7 sed '/^ *$/d'| sort |uniq -c | awk '
meillo@57 8 {sum+=$1; a[$2]=$1;}
meillo@57 9 END {for (x in a) {printf("%s\t%.2f\t%4d\n", x, a[x]/sum, a[x])} }
meillo@57 10 '| sort -nr -k 3