X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fscowl.git;a=blobdiff_plain;f=current%2Fsrc%2Fmake-words;h=bc68a0dc8cfe733b148b224c04d44fd2727c2cc0;hp=fe3cfb76925744307ea36c63f13bbd39ddfdf2c1;hb=7b14ba883fb1046508c44be37b4c6ba5da5feacf;hpb=b72d489091bf51f14f63db9bec15fe71fa52a395 diff --git a/current/src/make-words b/current/src/make-words index fe3cfb7..bc68a0d 100755 --- a/current/src/make-words +++ b/current/src/make-words @@ -9,21 +9,39 @@ max_level=`src/get-level max` if [ $1 -ne $max_level ] then + supplement=`src/get-all-below $1 supplement` add_affixes="`src/get-all-below $1 add-affixes`" + add_possessive="`src/get-all-below $1 add-possessive`" - cat `src/get-all-below $1 supplement` $add_affixes l/include/$1/* \ - | src/filter | sort | uniq > working/words.$1.tmp + cat $supplement $add_affixes $add_possessive l/include/$1/* \ + | src/filter \ + > working/words.$1.tmp + cp working/words.$1.tmp working/words.$1.tmp.0 if [ -n "$add_affixes" ] && [ $1 -le `cat l/add-affixes/max-level` ] then echo "Adding affixes" - cat $add_affixes | src/add-affixes >> working/words.$1.tmp + cat $add_affixes | src/filter | src/add-affixes >> working/words.$1.tmp + cp working/words.$1.tmp working/words.$1.tmp.1 fi - src/add-possessive working/words.$1.tmp + if [ $1 -lt 80 ] + then + if [ -n "$add_possessive" ] + then + echo "Adding possessive" + cat $add_possessive | src/filter | src/add-affixes just-possessive >> working/words.$1.tmp + cp working/words.$1.tmp working/words.$1.tmp.2 + fi + else + echo "Adding possessive" + cat working/words.$1.tmp \ + | src/add-affixes use-some just-possessive \ + > working/words.$1.tmp2 + mv working/words.$1.tmp2 working/words.$1.tmp + fi cat working/words.$1.tmp \ - | src/filter \ | src/add-other-spellings \ | src/add-other-forms \ | src/add-other-spellings \ @@ -31,16 +49,14 @@ then | comm -12 - working/words.`src/get-level next $1` \ > working/words.$1 - rm working/words.$1.tmp + #rm working/words.$1.tmp else cat working/all.lst \ - | src/add-possessive \ + | src/add-affixes use-all just-possessive \ | src/add-other-spellings \ | sort -u \ > working/words.$1 fi - -