]> git.donarmstrong.com Git - deb_pkgs/scowl.git/blobdiff - src/make-abbreviations.lst.pre
Imported Upstream version 2015.08.24
[deb_pkgs/scowl.git] / src / make-abbreviations.lst.pre
diff --git a/src/make-abbreviations.lst.pre b/src/make-abbreviations.lst.pre
new file mode 100755 (executable)
index 0000000..fb7249f
--- /dev/null
@@ -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
+
+
+
+
+
+
+