X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fmake-abbreviations.lst.pre;fp=src%2Fmake-abbreviations.lst.pre;h=fb7249f7a54bafd9b5431220eb1f3577b1c00669;hb=b13ea8a082364672c6de2b010e558211ff52ec9a;hp=0000000000000000000000000000000000000000;hpb=01534a94130c1f5a3a230cf4fe18365a235ba271;p=deb_pkgs%2Fscowl.git diff --git a/src/make-abbreviations.lst.pre b/src/make-abbreviations.lst.pre new file mode 100755 index 0000000..fb7249f --- /dev/null +++ b/src/make-abbreviations.lst.pre @@ -0,0 +1,40 @@ +#!/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/* \ + | 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 \ + | cat - r/special/abbreviations{,-also} \ + | sort | uniq \ + | comm -23 - r/special/never-abbreviations \ + > working/abbreviations.lst.pre + +rm working/{abbreviations.lst,acronyms.lst,roman-numerals,not-abbreviations}.tmp + + + + + + +