X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=7.1%2Fsrc%2Fmake-abbreviations.lst.pre;fp=7.1%2Fsrc%2Fmake-abbreviations.lst.pre;h=c4d44bb1a338f454a131d012df6c16869d5b62c4;hb=01534a94130c1f5a3a230cf4fe18365a235ba271;hp=0000000000000000000000000000000000000000;hpb=7b14ba883fb1046508c44be37b4c6ba5da5feacf;p=deb_pkgs%2Fscowl.git diff --git a/7.1/src/make-abbreviations.lst.pre b/7.1/src/make-abbreviations.lst.pre new file mode 100755 index 0000000..c4d44bb --- /dev/null +++ b/7.1/src/make-abbreviations.lst.pre @@ -0,0 +1,39 @@ +#!/bin/bash + +cat r/special/roman-numerals | tr 'a-z' 'A-Z' \ + | cat - r/special/roman-numerals \ + | sort | uniq \ + > working/roman-numerals.tmp + +cat working/all.lst-unfiltered | grep "\." | cat - l/abbreviations/* \ + | src/filter \ + | sort | uniq \ + | comm -23 - working/roman-numerals.tmp \ + > working/abbreviations.lst.tmp + +cat working/all.lst \ + | grep -E "^[A-Z]{2,}'?s?$" \ + > working/acronyms.lst.tmp + +cat l/not-abbreviations/* working/known-upper.lst \ + | src/filter \ + | src/add-affixes no-possessive \ + | sort | uniq \ + > working/not-abbreviations.tmp + +cat working/abbreviations.lst.tmp \ + | sort | uniq \ + | comm -23 - working/not-abbreviations.tmp \ + | cat - working/acronyms.lst.tmp \ + | sort | uniq \ + | comm -23 - r/special/never-abbreviations \ + > working/abbreviations.lst.pre + +rm working/{abbreviations.lst,acronyms.lst,roman-numerals,not-abbreviations}.tmp + + + + + + +