# Target for making MS Office speller lexicons. It depends on compilers # from Polderland, only available on the Divvun project computers # Polderland tools dir: PLTOOLSDIR = $(GTPRIV)/polderland/bin # Language-dependent Polderland tools: ifeq ($(GTLANG), sme) MKLEX = $(PLTOOLSDIR)/mklexSamiNort endif ifeq ($(GTLANG), smj) MKLEX = $(PLTOOLSDIR)/mklexSamiLule endif ifeq ($(GTLANG), sma) MKLEX = $(PLTOOLSDIR)/mklexSamiSout endif # Some other tools REZ = /Developer/Tools/Rez SETFILE = /Developer/Tools/SetFile HYPHCORR = $(SCRIPTDIR)/hyphenConverter.sh #################################################################### # COMMON variable definitions. #################################################################### SRCSITE = http://www.divvun.no/static_files SCPSITE = sd@divvun.no:xtdoc/sd/src/documentation/content/xdocs #################################################################### # PLX variable definitions. #################################################################### # MS Speller source files: PLXSRCfst = \ $(GTLANG)/polderland/mwe-$(GTLANG)-plx.txt \ $(GTLANG)/polderland/spellerproper-$(GTLANG)-plx.txt \ $(GTLANG)/polderland/spellernouns-$(GTLANG)-plx.txt \ $(GTLANG)/polderland/spelleradjs-$(GTLANG)-plx.txt \ $(GTLANG)/polderland/spellerabbrs-$(GTLANG)-plx.txt \ $(GTLANG)/polderland/spellerverbs-$(GTLANG)-plx.txt PLXSRCsuffix = $(GTLANG)/polderland/clitics-$(GTLANG)-plx.txt #################################################################### # PLX language-specific variable definitions. #################################################################### # MS Speller resources and constants ifeq ($(GTLANG), sme) RSRCFILE = CatalanLex.rsrc.hex ifneq "$(TEST)" "false" WINSPELL = mssp3samiNorthern-test.lex else WINSPELL = mssp3samiNorthern.lex endif MACSPELL = SamiNortLexWithCatalanRez HYPHPATT = SamiNorthy-patlx HYPHDIC = SamiNorthy-diclx else ifeq ($(GTLANG), smj) RSRCFILE = BasqueLex.rsrc.hex WINSPELL = mssp3samiLule.lex MACSPELL = SamiLuleLexWithBasqueRez HYPHPATT = SamiLule_hy-pat.lex HYPHDIC = SamiLule_hy-dic.lex else ifeq ($(GTLANG), sma) # Awaiting a north/south split, all sma is SO, not NO. DIALECT=SO RSRCFILE = SlovakLex.rsrc.hex WINSPELL = mssp3samiSout.lex MACSPELL = SamiSoutLexWithSlovakRez HYPHPATT = SamiLule_hy-pat.lex HYPHDIC = SamiLule_hy-dic.lex else WINSPELL = mssp3unknown.lex HYPHPATT = unknown_hy-pat.lex endif #################################################################### # Hunspell variable definitions. #################################################################### # Hunspell speller source files: HUNSPELLSRCfst = \ $(GTLANG)/hunspell/spellerproper-$(GTLANG)-plx.txt \ $(GTLANG)/hunspell/spellernouns-$(GTLANG)-plx.txt \ $(GTLANG)/hunspell/spelleradjs-$(GTLANG)-plx.txt \ $(GTLANG)/hunspell/spellerabbrs-$(GTLANG)-plx.txt \ $(GTLANG)/hunspell/spellerverbs-$(GTLANG)-plx.txt HUNSPELLSRCsuffix = $(GTLANG)/hunspell/clitics-$(GTLANG).txt #################################################################### # Amount of numerals to be generated for the PLX(?) speller #################################################################### SPNUMBERS = 10000 ifneq "$(TEST)" "false" SPNUMBERS = 10 endif #################################################################### # PRINT from fst in two different ways depending on whether we're testing #################################################################### #ifneq "$(TEST)" "false" #FSTPRINT = -e "write spaced-text > $@" #else FSTPRINT = -e "lower-side" -e "print words > $@" #endif # ============================================================================ # # Building the basic speller transducer - the starting point for all spellers # # ============================================================================ # # The spellernonrec-$GTLANG.fst file combines the hyphenating *.save file with # a filter to remove unwanted derivational patterns, + general hyphenation # patterns, and removes undesirable tags from the upper side. # # Also: hyphens at the end of +RCmpnd words are removed for easier processing # later in the PLX conversion. The word forms in question can still be # identified using the +RCmpnd tag. spellernonrec: $(GTLANG)/bin/spellernonrec-$(GTLANG).fst $(GTLANG)/bin/spellernonrec-$(GTLANG).fst: \ common/bin/derivation-filter.fst \ common/bin/speller-filter.fst \ common/bin/use-circ-filter.fst \ common/bin/use-marg-filter.fst \ common/bin/use-sub-filter.fst \ common/bin/use-nospeller-filter.fst \ common/bin/downcase-derived-proper.fst \ common/bin/usage-tags-remove.fst \ common/bin/remove-clb.fst \ common/src/remove-derivations.regex \ common/src/remove-inflections.regex \ $(GTLANG)/bin/focus-filter.fst \ $(GTLANG)/bin/hyph-$(GTLANG).save \ $(GTLANG)/bin/hyphrules-$(GTLANG).fst \ $(GTLANG)/polderland/testing/words.txt @echo @echo "*** Building $@ ***" ; @echo $(CFST) -e "read regex \ @\"common/bin/derivation-filter.fst\" \ .o. @\"$(GTLANG)/bin/focus-filter.fst\" \ .o. @re\"common/src/speller-filter.regex\" \ .o. @re\"common/src/remove-clb.regex\" \ .o. @re\"common/src/use-circ-filter.regex\" \ .o. @re\"common/src/use-marg-filter.regex\" \ .o. @re\"common/src/use-sub-filter.regex\" \ .o. @re\"common/src/use-nospeller-filter.regex\" \ .o. @\"$(GTLANG)/bin/hyph-$(GTLANG).save\" \ .o. @\"common/bin/downcase-derived-proper.fst\" ; " \ -e "set flag-is-epsilon ON" \ -e "read regex @\"$(GTLANG)/bin/hyphrules-$(GTLANG).fst\".i ; " \ -e "turn stack" \ -e "compose net" \ -e "define fst" \ -e "read regex @re\"common/polderland/RCmpnd-filter.regex\" ; " \ -e "define rcmpnd" \ -e "read regex rcmpnd .o. fst ;" \ -e "define cmps" \ -e "read regex cmps .o. [%- -> 0 || _ .#.] ; " \ -e "read regex fst - cmps ; " \ -e "union net" \ -e "save stack $@" \ -stop ifneq "$(TEST)" "false" grep -v '^!' < $(GTLANG)/polderland/testing/words.txt \ > $(GTLANG)/polderland/testing/tmpwords.txt $(CFST) -e "set flag-is-epsilon ON" \ -e "read regex \ @stxt\"$(GTLANG)/polderland/testing/tmpwords.txt\" \ [? - %# ]* \ .o. [ @re\"common/src/remove-derivations.regex\" \ .o. @re\"common/src/remove-inflections.regex\" \ .o. @\"$@\"] ; " \ -e "read regex \ @re\"$(GTLANG)/polderland/testing/words.regex\" \ .o. [ @re\"common/src/remove-derivations.regex\" \ .o. @re\"common/src/remove-inflections.regex\" \ .o. @\"$@\"] ; " \ -e "union net" \ -e "save stack $@.tmp" \ -stop mv -f $@.tmp $@ endif #################################################################### # PLX conversion starts here #################################################################### # Before we compile the plx speller lexicon, we collect all pieces and rev-sort them: tmp/all-plx-$(GTLANG).revsorted: \ common/polderland/version.plx \ ms-speller-version \ $(GTLANG)/polderland/num-$(GTLANG)-plx.txt \ $(GTLANG)/polderland/mwe-$(GTLANG)-plx.txt \ $(GTLANG)/polderland/spellerproper-$(GTLANG)-plx.txt \ $(GTLANG)/polderland/spellernouns-$(GTLANG)-plx.txt \ $(GTLANG)/polderland/spelleradjs-$(GTLANG)-plx.txt \ $(GTLANG)/polderland/spellerabbrs-$(GTLANG)-plx.txt \ $(GTLANG)/polderland/spellerverbs-$(GTLANG)-plx.txt @echo @echo "*** Sorting $(GTLANG) files ***" @echo @if [ ! -d tmp/$(GTLANG) ]; then \ mkdir tmp/$(GTLANG) ; \ fi ifneq "$(TEST)" "false" @LC_ALL=C sort -S 6G -T tmp/$(GTLANG) -ur -o \ $(GTLANG)/polderland/testing/actual.plx \ tmp/$(GTLANG)-version.plx \ common/polderland/version.plx \ $(GTLANG)/polderland/num-$(GTLANG)-plx.txt \ $(PLXSRCsuffix) $(PLXSRCfst) else @LC_ALL=C sort -S 6G -T tmp/$(GTLANG) -ur -o $@ \ tmp/$(GTLANG)-version.plx \ common/polderland/version.plx \ $(GTLANG)/polderland/num-$(GTLANG)-plx.txt \ $(PLXSRCsuffix) $(PLXSRCfst) endif # We compile the final MS Office speller lexicon here: ms-win-speller: $(GTLANG)/polderland/$(WINSPELL) $(GTLANG)/polderland/$(WINSPELL): \ common/polderland/version.phon \ tmp/all-plx-$(GTLANG).revsorted \ $(GTPRIV)/polderland/src/phonrules-$(GTLANG).txt \ ms-speller-version @echo @echo "*** cat-ing $(GTLANG) phon files ***" @echo @cat $(GTPRIV)/polderland/src/phonrules-$(GTLANG).txt \ common/polderland/version.phon \ tmp/$(GTLANG)-version.phon > tmp/$(GTLANG)-phon.txt @echo @echo "*** Compiling $(GTLANG) M$$ speller lexicon ***" @echo ifneq "$(TEST)" "false" cut -f1,2 < $(GTLANG)/polderland/testing/actual.plx | uniq \ > $(GTLANG)/polderland/testing/actual.plx.tmp $(MKLEX) -M512 -p tmp/$(GTLANG)-phon.txt \ $(GTLANG)/polderland/testing/actual.plx.tmp $@ else $(MKLEX) -M512 -p tmp/$(GTLANG)-phon.txt tmp/all-plx-$(GTLANG).revsorted $@ endif # Upload the speller lexicon when finished # `make` uses lazy evaluation, meaning that the REVISION variable won't be set # until needed, thus reflecting the true revision number fetched from victorio. upload: REVISION = $(shell cat $(GTLANG)/polderland/revision.txt) upload: ifneq "$(TEST)" "false" @echo @echo "*** We're testing, nothing uploaded ***" @echo else @echo @echo "*** Uploading $(WINSPELL) to our download site ***" @echo scp $(GTLANG)/polderland/$(WINSPELL) sd@divvun.no:staticfiles/$(DATE)-$(REVISION)-$(WINSPELL) $(SSH) sd@divvun.no "cd staticfiles/ && ln -sf $(DATE)-$(REVISION)-$(WINSPELL) $(WINSPELL)" endif # This is the overall MS Office speller target. First build the lexicon, # then upload: ms-speller: ms-win-speller upload # Version easter egg generation: ms-speller-version: @echo @echo "*** Creating $(GTLANG) M$$ speller version info easter egg ***" @echo svn info | grep Revision | cut -d ' ' -f2 > $(GTLANG)/polderland/revision.txt $(SCRIPTDIR)/prooftools/add-version-info.pl \ --lang=$(GTLANG) \ --version=$(GTLANG)/polderland/version.txt \ --date=$(DATE) \ --revision=$(GTLANG)/polderland/revision.txt \ --plxfile=tmp/$(GTLANG)-version.plx \ --phonfile=tmp/$(GTLANG)-version.phon # abbrlist = all other POS's than V, A, N, Nprop and numerals verblist: $(GTLANG)/polderland/spellerverbs-$(GTLANG)-plx.txt abbrlist: $(GTLANG)/polderland/spellerabbrs-$(GTLANG)-plx.txt adjlist: $(GTLANG)/polderland/spelleradjs-$(GTLANG)-plx.txt nounlist: $(GTLANG)/polderland/spellernouns-$(GTLANG)-plx.txt nounlist: $(GTLANG)/polderland/spellernouns-$(GTLANG)-plx.txt properlist: $(GTLANG)/polderland/spellerproper-$(GTLANG)-plx.txt $(GTLANG)/polderland/%.txt: $(GTLANG)/bin/%.fst \ common/bin/hyphen-convert.fst \ common/bin/remove-derinfl-borders.fst @echo @echo "*** Building $(@F) word list in PLX format ***" @echo $(CFST) -e "load stack < common/bin/hyphen-convert.fst" \ -e "load stack < common/bin/remove-derinfl-borders.fst" \ -e "load stack < $<" \ -e "compose net" \ $(FSTPRINT) \ -stop # If we are testing: #ifneq "$(TEST)" "false" # cat $@ | reformat-space-text.pl > $@.test # mv -f $@.test $@ #endif # ==================================================== # # Building Hunspell spellers # # ==================================================== # # This is the input that hunspell spellers are created from. # abbrlist = all other POS's than V, A, N, Nprop and numerals verblist-hunspell: $(GTLANG)/hunspell/spellerverbs-$(GTLANG)-plx.txt abbrlist-hunspell: $(GTLANG)/hunspell/spellerabbrs-$(GTLANG)-plx.txt adjlist-hunspell: $(GTLANG)/hunspell/spelleradjs-$(GTLANG)-plx.txt nounlist-hunspell: $(GTLANG)/hunspell/spellernouns-$(GTLANG)-plx.txt properlist-hunspell: $(GTLANG)/hunspell/spellerproper-$(GTLANG)-plx.txt $(GTLANG)/hunspell/%.txt: $(GTLANG)/bin/%.fst \ common/bin/hyphen-remove.fst @echo @echo "*** Building $(@F) word list in hunspell format ***" @echo $(CFST) -e "load stack < common/bin/hyphen-remove.fst" \ -e "load stack < $<" \ -e "compose net" \ $(FSTPRINT) \ -stop # Make the hunspell aff and dic files. Depends on all speller words in a # sorted text file: hunspellspellercompounding: \ tmp/all-hunspell-$(GTLANG).sorted @echo @echo "*** Making $(GTLANG) hunspell dictionary ***" wordlist2hunspell $(GTLANG) tmp/all-hunspell-$(GTLANG).sorted hunspellspellernocompounding: \ tmp/all-hunspell-$(GTLANG).sorted @echo @echo "*** Making $(GTLANG) hunspell dictionary ***" wordlist2hunspell -nocompound $(GTLANG) tmp/all-hunspell-$(GTLANG).sorted upload-hunspell: $(GTLANG)/hunspell/$(GTLANG).dic $(GTLANG)/hunspell/$(GTLANG).aff zip -j tmp/$(DATE)-$(GTLANG).hunspell.zip $(GTLANG)/hunspell/$(GTLANG).aff $(GTLANG)/hunspell/$(GTLANG).dic $(GTLANG)/hytex/hyph_$(GTLANG).dic @scp tmp/$(DATE)-$(GTLANG).hunspell.zip sd@divvun.no:static_files/ @$(SSH) sd@divvun.no "cd staticfiles/ && ln -sf $(DATE)-$(GTLANG).hunspell.zip $(GTLANG).hunspell.zip" # Before we compile the hunspell lexicons, we sort the full wordlist. This # target requires the full wordlist to be printed and available tmp/all-hunspell-$(GTLANG).sorted: \ verblist-hunspell \ abbrlist-hunspell \ adjlist-hunspell \ nounlist-hunspell \ properlist-hunspell @echo @echo "*** Sorting $(GTLANG) files ***" @echo @if [ ! -d tmp/$(GTLANG) ]; then \ mkdir tmp/$(GTLANG) ; \ fi @LC_ALL=C sort -S 3G -T tmp/$(GTLANG) -u -o $@\ $(HUNSPELLSRCprefix) $(HUNSPELLSRCfst) common/bin/%.fst: common/polderland/%.regex @echo @echo "*** Building $(@F) ***" ; @echo $(CFST) -e "read regex < $< " \ -e "save stack $@ " \ -stop # ==================================================== # # Building PLX transducers # # ==================================================== # # ==================================================== # # Building speller transducers for specific POSes only # # ==================================================== # plxnonrec: $(GTLANG)/bin/plxnonrec-$(GTLANG).fst $(GTLANG)/bin/plxnonrec-$(GTLANG).fst: \ $(GTLANG)/bin/spellernonrec-$(GTLANG).fst \ $(GTLANG)/bin/plxnonrecder-$(GTLANG).fst \ common/bin/remove-hyphen.fst \ common/polderland/plx-der-cmp-filter.regex @echo @echo "*** Building $@ ***" ; @echo $(XFST) -e "read regex @\"$(GTLANG)/bin/plxnonrecder-$(GTLANG).fst\" ; " \ -e "define der" \ -e "read regex @\"$<\" ; " \ -e "define plx" \ -e "read regex plx - der ; " \ -e "define plx2" \ -e "read regex @\"common/bin/remove-hyphen.fst\" ; " \ -e "define removehyphen" \ -e "read regex plx2 .o. removehyphen ; " \ -e "save stack $@" \ -stop # This removes lexicalized derivations plxnonrecder: $(GTLANG)/bin/plxnonrecder-$(GTLANG).fst $(GTLANG)/bin/plxnonrecder-$(GTLANG).fst: \ $(GTLANG)/bin/spellernonrec-$(GTLANG).fst \ common/bin/remove-hyphen.fst \ common/polderland/plx-der-cmp-filter.regex @echo @echo "*** Building $@ ***" ; @echo $(XFST) -e "read regex @\"$<\" \ .o. @re\"common/polderland/plx-der-cmp-filter.regex\" \ .o. @\"common/bin/remove-hyphen.fst\" ; " \ -e "save stack $@" \ -stop # Multiword printing. First it filters in all entries # containing space(s), then it separates last part and nonlast parts of these # entries and replaces spaces with line breaks. Printed word list # is sorted and plx tags are added to words. spellermwe: $(GTLANG)/polderland/mwe-$(GTLANG)-plx.txt $(GTLANG)/polderland/mwe-$(GTLANG)-plx.txt: \ $(GTLANG)/bin/plxnonrec-$(GTLANG).fst \ common/bin/mwe-filter.fst \ common/bin/hyphen-convert.fst @echo @echo "*** Building multi-word fst ***" ; @echo $(CFST) -e "read regex @\"common/bin/mwe-filter.fst\" .o. @\"$<\" ; " \ -e "define multi" \ -e "read regex [0 <- ?* || \\\" \"* \" \" _ .#.] \ .o. multi .o. [?* -> 0 || \\\" \"* \" \" _ .#.] ; " \ -e "define nonlast" \ -e "read regex [0 <- ?* || .#. _ \" \" \\\" \"*] \ .o. multi .o. [?* -> 0 || .#. _ \" \" \\\" \"*] ; " \ -e "define last" \ -e "read regex [\"\n\" <- { }] .o. last .o. [{ } -> \"\n\"] ; " \ -e "push nonlast" \ -e "union net" \ -e "load stack < common/bin/hyphen-convert.fst" \ -e "turn stack" \ -e "compose net" \ -e "lower-side" \ -e "print words > $@.tmp" \ -stop LC_ALL=C cat $@.tmp | sort -ru | sed -e 's/\(.*\)/\1 WIX/g' > $@ # The spellerverbs.fst target creates a derived speller transducer # only containing verbs, by utilising a special verb filter. spellerverbs: $(GTLANG)/bin/spellerverbs-$(GTLANG).fst $(GTLANG)/bin/spellerverbs-$(GTLANG).fst: \ $(GTLANG)/bin/plxnonrec-$(GTLANG).fst \ common/bin/verb-filter.fst @echo @echo "*** Building spellerverbs-$(GTLANG).fst ***" ; @echo $(CFST) -e "read regex @\"common/bin/verb-filter.fst\" \ .o. @\"$(GTLANG)/bin/plxnonrec-$(GTLANG).fst\" ; " \ -e "union net" \ -e "turn stack" \ -e "compose net" \ -e "save stack $@" \ -stop spellerverbs-plx: $(GTLANG)/bin/spellerverbs-$(GTLANG)-plx.fst $(GTLANG)/bin/spellerverbs-$(GTLANG)-plx.fst: \ $(GTLANG)/bin/spellerverbs-$(GTLANG).fst @echo @echo "*** Building spellerverbs-$(GTLANG)-plx.fst ***" ; @echo $(CFST) \ -e "read regex @re\"common/polderland/V-Actio-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerverbs-$(GTLANG).fst\" ; " \ -e "define actio" \ -e "read regex @\"$(GTLANG)/bin/spellerverbs-$(GTLANG).fst\" - actio; " \ -e "define noactio" \ -e "read regex @re\"common/polderland/V-Inf-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerverbs-$(GTLANG).fst\" ; " \ -e "define infinitive" \ -e "read regex @re\"common/polderland/V-PrfPrc-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerverbs-$(GTLANG).fst\" ; " \ -e "define prfprc" \ -e "read regex infinitive [{- WIX} ]; " \ -e "read regex prfprc [{ NABI}]; " \ -e "read regex prfprc [{- WIX} ]; " \ -e "read regex actio [{ VI} ]; " \ -e "read regex noactio [{ VI} ]; " \ -e "union net" \ -e "turn stack" \ -e "load stack < common/bin/usage-tags-remove.fst" \ -e "compose net" \ -e "save stack $@" \ -stop # Filters out all uninflectable words + abbreviations, acronyms # and (underived) pronouns spellerabbrs: $(GTLANG)/bin/spellerabbrs-$(GTLANG).fst $(GTLANG)/bin/spellerabbrs-$(GTLANG).fst: \ $(GTLANG)/bin/plxnonrec-$(GTLANG).fst \ common/bin/abbr-filter.fst @echo @echo "*** Building spellerabbrs-$(GTLANG).fst ***" ; @echo $(CFST) -e "read regex @\"common/bin/abbr-filter.fst\" \ .o. @\"$(GTLANG)/bin/plxnonrec-$(GTLANG).fst\" ; " \ -e "save stack $@" \ -stop # Encodes all uninflectable words + abbreviations, acronyms # and (underived) pronouns spellerabbrs-plx: $(GTLANG)/bin/spellerabbrs-$(GTLANG)-plx.fst $(GTLANG)/bin/spellerabbrs-$(GTLANG)-plx.fst: \ $(GTLANG)/bin/spellerabbrs-$(GTLANG).fst @echo @echo "*** Building spellerabbrs-$(GTLANG)-plx.fst ***" ; @echo $(CFST) \ -e "read regex @re\"common/polderland/N-None-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerabbrs-$(GTLANG).fst\" ; " \ -e "define none" \ -e "read regex @re\"common/polderland/nosugg-first-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerabbrs-$(GTLANG).fst\" ; " \ -e "define nosuggfirst" \ -e "read regex @re\"common/polderland/ABBR-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerabbrs-$(GTLANG).fst\" ; " \ -e "define abbrcmp" \ -e "read regex @re\"common/polderland/ABBR-Cmp-nosugg-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerabbrs-$(GTLANG).fst\" ; " \ -e "define abbrcmpnosugg" \ -e "read regex @re\"common/polderland/ACRO-Nocmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerabbrs-$(GTLANG).fst\" ; " \ -e "define acronocmp" \ -e "read regex @re\"common/polderland/ABBR-Nocmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerabbrs-$(GTLANG).fst\" ; " \ -e "define abbrnocmp" \ -e "read regex @re\"common/polderland/ACRO-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerabbrs-$(GTLANG).fst\" ; " \ -e "define acrocmp" \ -e "read regex @re\"common/polderland/Adv-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerabbrs-$(GTLANG).fst\" ; " \ -e "define advcmp" \ -e "read regex @\"$(GTLANG)/bin/spellerabbrs-$(GTLANG).fst\" \ - [ abbrcmp \ | abbrcmpnosugg \ | abbrnocmp \ | acrocmp \ | advcmp \ | acronocmp \ | nosuggfirst \ | none]; " \ -e "define therest" \ -e "read regex none [{ WI} ] ; " \ -e "read regex nosuggfirst [{- NBX} ] ; " \ -e "read regex abbrcmp [{- NePABX} ] ; " \ -e "read regex abbrcmpnosugg [{ WEIX} ] ; " \ -e "read regex abbrcmpnosugg [{- WIX,NePABX} ] ; " \ -e "read regex abbrnocmp [{ WIX} ] ; " \ -e "read regex acrocmp [{ NePE,WI} ] ; " \ -e "read regex acrocmp [{- NIX,NePABO} ] ; " \ -e "read regex acronocmp [{ NI,NePE} ] ; " \ -e "read regex advcmp [{ NAPBX,NtPAB,NIX}] ; " \ -e "read regex therest [{ NI} ] ; " \ -e "union net" \ -e "turn stack" \ -e "load stack < common/bin/usage-tags-remove.fst" \ -e "compose net" \ -e "save stack $@ " \ -stop spelleradjs: $(GTLANG)/bin/spelleradjs-$(GTLANG).fst $(GTLANG)/bin/spelleradjs-$(GTLANG).fst: \ $(GTLANG)/bin/plxnonrec-$(GTLANG).fst \ $(GTLANG)/bin/spellernums-$(GTLANG)-plx.fst \ common/bin/adj-filter.fst @echo @echo "*** Building spelleradjs-$(GTLANG).fst ***" ; @echo $(CFST) -e "read regex @\"common/bin/adj-filter.fst\" \ .o. @\"$(GTLANG)/bin/plxnonrec-$(GTLANG).fst\" ; " \ -e "read regex @\"common/bin/adj-filter.fst\" \ .o. @\"$(GTLANG)/bin/spellernums-$(GTLANG)-plx.fst\" ; " \ -e "union net" \ -e "save stack $@" \ -stop spelleradjs-plx: $(GTLANG)/bin/spelleradjs-$(GTLANG)-plx.fst $(GTLANG)/bin/spelleradjs-$(GTLANG)-plx.fst: \ $(GTLANG)/bin/spelleradjs-$(GTLANG).fst @echo @echo "*** Building spelleradjs-$(GTLANG)-plx.fst ***" ; @echo $(CFST) \ -e "read regex @re\"common/polderland/N-None-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define none" \ -e "read regex @re\"common/polderland/N-Last-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define last" \ -e "read regex @re\"common/polderland/A-Adv-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; "\ -e "define adv" \ -e "read regex @re\"common/polderland/N-Sg-Nom-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define sgnom" \ -e "read regex @re\"common/polderland/N-Sg-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define sggen" \ -e "read regex @re\"common/polderland/N-Pl-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define plgen" \ -e "read regex @re\"common/polderland/N-Sg-Nom-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define sgnomcmp" \ -e "read regex @re\"common/polderland/N-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define sggencmp" \ -e "read regex @re\"common/polderland/N-Pl-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define plgencmp" \ -e "read regex @re\"common/polderland/A-Def-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define defsggencmp" \ -e "read regex @re\"common/polderland/A-Def-Pl-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define defplgencmp" \ -e "read regex @re\"common/polderland/N-Sg-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define sggencmpx" \ -e "read regex @re\"common/polderland/N-Pl-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define plgencmpx" \ -e "read regex @re\"common/polderland/N-Sg-Nom-Left-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define sgnomleft" \ -e "read regex @re\"common/polderland/N-Sg-Gen-Left-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define sggenleft" \ -e "read regex @re\"common/polderland/N-Pl-Gen-Left-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define plgenleft" \ -e "read regex @re\"common/polderland/N-Sg-Nom-Left-Mid-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define sgnomleftmid" \ -e "read regex @re\"common/polderland/N-Sg-Gen-Left-Mid-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define sggenleftmid" \ -e "read regex @re\"common/polderland/N-Pl-Gen-Left-Mid-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define plgenleftmid" \ -e "read regex @re\"common/polderland/A-Attr-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; " \ -e "define attrcmp" \ -e "read regex @re\"common/polderland/A-Attr-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" ; "\ -e "define allattr" \ -e "read regex @re\"common/polderland/A-Attr-Sharp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\"; " \ -e "define attrder" \ -e "read regex allattr - attrder;" \ -e "define attr" \ -e "read regex @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ - [ none | last | adv \ | sgnom | sggen | plgen \ | sgnomcmp | sggencmp | plgencmp \ | defsggencmp | defplgencmp \ | sggencmpx | plgencmpx \ | attrcmp | attr]; " \ -e "define otherforms" \ -e "read regex none [{ NI} ]; " \ -e "read regex last [{ NAIE} ]; " \ -e "read regex adv [{ NAI} ]; " \ -e "read regex [sgnom .o. ~[ a a ?* | e e ?* ]] [{ NAIE,NePOE} ]; " \ -e "read regex [sgnom .o. ~[ a a ?* | e e ?* ]] [{- WIX,NEX} ]; " \ -e "read regex [sgnom .o. [ a a ?* | e e ?* ]] [{ NePIE} ]; " \ -e "read regex [sgnom .o. [ a a ?* | e e ?* ]] [{- NIX,NePABO,NePEX} ]; " \ -e "read regex [sggen .o. ~[ a a ?* | e e ?* ]] [{ NAIE,NePOE} ]; " \ -e "read regex [sggen .o. [ a a ?* | e e ?* ]] [{ NePBO,NAB,NePIE} ]; " \ -e "read regex [plgen .o. ~[ a a ?* | e e ?* ]] [{ GpBO,NePIOE} ]; " \ -e "read regex [plgen .o. ~[ a a ?* | e e ?* ]] [{ NAIE,NePAOE} ]; " \ -e "read regex [plgen .o. [ a a ?* | e e ?* ]] [{ GpBO,NePIE} ]; " \ -e "read regex [sgnomcmp .o. ~[ a a ?* | e e ?* ]] [{ NABO} ]; " \ -e "read regex [sgnomcmp .o. [ a a ?* | e e ?* ]] [{ NePOE,NAB} ]; " \ -e "read regex [sgnomcmp .o. ~[ a a ?* | e e ?* ]] [{- WIX,NEX} ]; " \ -e "read regex [sggencmp .o. ~[ a a ?* | e e ?* ]] [{ GaBO} ]; " \ -e "read regex [sggencmp .o. ~[ a a ?* | e e ?* ]] [{- WIX,NEX} ]; " \ -e "read regex [sggencmp .o. [ a a ?* | e e ?* ]] [{- NAPIX,NAPB,NePABO} ]; " \ -e "read regex [sggencmp .o. [ a a ?* | e e ?* ]] [{- NABOIEX,NtPABX,NePAEOX} ]; " \ -e "read regex plgencmp [{ GpBO,NABO} ]; " \ -e "read regex [plgencmp .o. ~[ a a ?* | e e ?* ]] [{- WIX,NEX} ]; " \ -e "read regex [plgencmp .o. ~[ a a ?* | e e ?* ]] [{ NABO} ]; " \ -e "read regex [plgencmp .o. [ a a ?* | e e ?* ]] [{- NAPIX,NAPB,NePABO} ]; " \ -e "read regex defsggencmp [{ GaBO} ]; " \ -e "read regex defplgencmp [{ GpBO} ]; " \ -e "read regex defplgencmp [{ NABOIEX,NtPABIX,NePAEOX} ]; " \ -e "read regex sggencmpx [{ NABO} ]; " \ -e "read regex [sggencmpx .o. ~[ a a ?* | e e ?* ]] [{- WIX,NEX} ]; " \ -e "read regex [plgencmpx .o. ~[ a a ?* | e e ?* ]] [{ NABO} ]; " \ -e "read regex [plgencmpx .o. ~[ a a ?* | e e ?* ]] [{- WIX,NEX} ]; " \ -e "read regex sgnomleft [{ NAE} ]; " \ -e "read regex sggenleft [{ NaAE} ]; " \ -e "read regex plgenleft [{ NpAE} ]; " \ -e "read regex sgnomleftmid [{ NO} ]; " \ -e "read regex sggenleftmid [{ NaO} ]; " \ -e "read regex plgenleftmid [{ NpO} ]; " \ -e "read regex attrcmp [{- WIX,NEX} ]; " \ -e "read regex attr [{ NAIBOE} ]; " \ -e "read regex [otherforms .o. ~[ a a ?* | e e ?* ]] [{ NAIE,NePAE} ]; " \ -e "read regex [otherforms .o. [ a a ?* | e e ?* ]] [{ NtPA+,NePIE} ]; " \ -e "union net" \ -e "turn stack" \ -e "load stack < common/bin/usage-tags-remove.fst" \ -e "compose net" \ -e "save stack $@" \ -stop spellernouns: $(GTLANG)/bin/spellernouns-$(GTLANG).fst $(GTLANG)/bin/spellernouns-$(GTLANG).fst: \ $(GTLANG)/bin/plxnonrec-$(GTLANG).fst \ $(GTLANG)/bin/spellernums-$(GTLANG)-plx.fst \ common/bin/noun-filter.fst @echo @echo "*** Building spellernouns-$(GTLANG).fst ***" ; @echo $(CFST) -e "read regex @\"common/bin/noun-filter.fst\" \ .o. @\"$(GTLANG)/bin/plxnonrec-$(GTLANG).fst\" ; " \ -e "read regex @\"common/bin/noun-filter.fst\" \ .o. @\"$(GTLANG)/bin/spellernums-$(GTLANG)-plx.fst\" ; " \ -e "union net" \ -e "save stack $@" \ -stop spellernouns-plx: $(GTLANG)/bin/spellernouns-$(GTLANG)-plx.fst $(GTLANG)/bin/spellernouns-$(GTLANG)-plx.fst: \ $(GTLANG)/bin/spellernouns-$(GTLANG).fst @echo @echo "*** Building spellernouns-$(GTLANG)-plx.fst ***" ; @echo ## Positional tags: # +None # +Last $(CFST) \ -e "read regex @re\"common/polderland/N-None-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define none" \ -e "read regex @re\"common/polderland/N-First-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define first" \ -e "read regex @re\"common/polderland/N-Last-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define last" \ -e "read regex @re\"common/polderland/N-Pref-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define pref" \ -e "read regex @re\"common/polderland/N-Sg-Nom-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define sgnom" \ -e "read regex @re\"common/polderland/N-Sg-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define sggen" \ -e "read regex @re\"common/polderland/N-Pl-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define plgen" \ -e "read regex @re\"common/polderland/N-Sg-Nom-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define sgnomcmp" \ -e "read regex @re\"common/polderland/N-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define sggencmp" \ -e "read regex @re\"common/polderland/N-Pl-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define plgencmp" \ -e "read regex @re\"common/polderland/N-Def-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define defsggencmp" \ -e "read regex @re\"common/polderland/N-Def-Pl-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define defplgencmp" \ -e "read regex @re\"common/polderland/N-Sg-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define sggencmpx" \ -e "read regex @re\"common/polderland/N-Pl-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define plgencmpx" \ -e "read regex @re\"common/polderland/N-Sg-Nom-Left-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define sgnomleft" \ -e "read regex @re\"common/polderland/N-Sg-Gen-Left-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define sggenleft" \ -e "read regex @re\"common/polderland/N-Pl-Gen-Left-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define plgenleft" \ -e "read regex @re\"common/polderland/N-Sg-Nom-Left-Mid-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define sgnomleftmid" \ -e "read regex @re\"common/polderland/N-Sg-Gen-Left-Mid-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define sggenleftmid" \ -e "read regex @re\"common/polderland/N-Pl-Gen-Left-Mid-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define plgenleftmid" \ -e "read regex @re\"common/polderland/N-RCmpnd-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" ; " \ -e "define nrcmpnd" \ -e "read regex @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ - [ none | last | pref \ | sgnom | sggen | plgen \ | sgnomcmp | sggencmp | plgencmp \ | defsggencmp | defplgencmp | first \ | sggencmpx | plgencmpx | nrcmpnd ] ; " \ -e "define rest" \ -e "read regex @re\"common/polderland/rm-positional-tagged-filter.regex\" \ .o. rest ; " \ -e "define positional" \ -e "read regex rest - positional ;" \ -e "define otherforms" \ -e "read regex none [{ NI} ]; " \ -e "read regex first [{ NIB} ]; " \ -e "read regex last [{ NIE} ]; " \ -e "read regex pref [{ NAB} ]; " \ -e "read regex pref [{- NAIX,NePABX} ]; " \ -e "read regex [sgnom .o. ~[ a a ?* | e e ?* ]] [{ NAIE,NePOE} ]; " \ -e "read regex [sgnom .o. ~[ a a ?* | e e ?* ]] [{- WIX,NEX} ]; " \ -e "read regex [sgnom .o. [ a a ?* | e e ?* ]] [{ NePIE} ]; " \ -e "read regex [sgnom .o. [ a a ?* | e e ?* ]] [{- NIX,NePABO,NePEX} ]; " \ -e "read regex [sggen .o. ~[ a a ?* | e e ?* ]] [{ NAIE,NePOE} ]; " \ -e "read regex [sggen .o. [ a a ?* | e e ?* ]] [{ NePBO,NAB,NePIE} ]; " \ -e "read regex [plgen .o. ~[ a a ?* | e e ?* ]] [{ GpBO,NePIOE} ]; " \ -e "read regex [plgen .o. ~[ a a ?* | e e ?* ]] [{ NAIE,NePAOE} ]; " \ -e "read regex [plgen .o. [ a a ?* | e e ?* ]] [{ GpBO,NePIE} ]; " \ -e "read regex [sgnomcmp .o. ~[ a a ?* | e e ?* ]] [{ NABO} ]; " \ -e "read regex [sgnomcmp .o. [ a a ?* | e e ?* ]] [{ NePOE,NAB} ]; " \ -e "read regex [sgnomcmp .o. ~[ a a ?* | e e ?* ]] [{- WIX,NEX} ]; " \ -e "read regex [sggencmp .o. ~[ a a ?* | e e ?* ]] [{ GaBO} ]; " \ -e "read regex [sggencmp .o. ~[ a a ?* | e e ?* ]] [{- WIX,NEX} ]; " \ -e "read regex [sggencmp .o. [ a a ?* | e e ?* ]] [{- NAPIX,NAPB,NePABO} ]; " \ -e "read regex [sggencmp .o. [ a a ?* | e e ?* ]] [{- NABOIEX,NtPABX,NePAEOX} ]; " \ -e "read regex plgencmp [{ GpBO,NABO} ]; " \ -e "read regex [plgencmp .o. ~[ a a ?* | e e ?* ]] [{- WIX,NEX} ]; " \ -e "read regex [plgencmp .o. [ a a ?* | e e ?* ]] [{- NAPIX,NAPB,NePABO} ]; " \ -e "read regex defsggencmp [{ GaBO} ]; " \ -e "read regex defplgencmp [{ GpBO} ]; " \ -e "read regex sggencmpx [{ NABO} ]; " \ -e "read regex [sggencmpx .o. ~[ a a ?* | e e ?* ]] [{- WIX,NEX} ]; " \ -e "read regex [plgencmpx .o. ~[ a a ?* | e e ?* ]] [{ NABO} ]; " \ -e "read regex [plgencmpx .o. ~[ a a ?* | e e ?* ]] [{- WIX,NEX} ]; " \ -e "read regex sgnomleft [{ NAE} ]; " \ -e "read regex sggenleft [{ NaAE} ]; " \ -e "read regex plgenleft [{ NpAE} ]; " \ -e "read regex sgnomleftmid [{ NO} ]; " \ -e "read regex sggenleftmid [{ NaO} ]; " \ -e "read regex plgenleftmid [{ NpO} ]; " \ -e "read regex nrcmpnd [{- WI} ]; " \ -e "read regex [otherforms .o. ~[ a a ?* | e e ?* ]] [{ NAIE,NePAE} ]; " \ -e "read regex [otherforms .o. [ a a ?* | e e ?* ]] [{ NtPA+,NePIE} ]; " \ -e "read regex positional [{ NI} ]; " \ -e "union net" \ -e "turn stack" \ -e "load stack < common/bin/usage-tags-remove.fst" \ -e "compose net" \ -e "save stack $@" \ -stop spellerproper: $(GTLANG)/bin/spellerproper-$(GTLANG).fst $(GTLANG)/bin/spellerproper-$(GTLANG).fst: \ $(GTLANG)/bin/plxnonrec-$(GTLANG).fst \ common/bin/propernoun-filter.fst @echo @echo "*** Building spellerproper-$(GTLANG).fst ***" ; @echo $(CFST) -e "read regex @\"common/bin/propernoun-filter.fst\" \ .o. @\"$(GTLANG)/bin/plxnonrec-$(GTLANG).fst\" ; " \ -e "save stack $@" \ -stop ifeq ($(GTLANG), sma) PROPERSMA = -e "read regex [ @re\"common/polderland/N-Sg-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ .o. ~[ A a ?* | E e ?* ] ] [{ NAIE}]; " \ -e "read regex @re\"common/polderland/N-Sg-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{- NABOX,NtPAB,NePAEOX}]; " \ -e "read regex @re\"common/polderland/N-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NABO}]; " \ -e "read regex @re\"common/polderland/N-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{- NABOIEX,NtPAB,NePAEOX}]; " else PROPERSMA = endif spellerproper-plx: $(GTLANG)/bin/spellerproper-$(GTLANG)-plx.fst $(GTLANG)/bin/spellerproper-$(GTLANG)-plx.fst: \ $(GTLANG)/bin/spellerproper-$(GTLANG).fst @echo @echo "*** Building spellerproper-$(GTLANG)-plx.fst ***" ; @echo $(CFST) \ -e "read regex @re\"common/polderland/N-None-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" ; " \ -e "define none" \ -e "read regex @re\"common/polderland/N-Last-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" ; " \ -e "define last" \ -e "read regex @re\"common/polderland/Prop-Sg-Nom-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" ; " \ -e "define sgnom" \ -e "read regex @re\"common/polderland/Prop-Sg-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" ; " \ -e "define sggen" \ -e "read regex @re\"common/polderland/Prop-Pl-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" ; " \ -e "define plgen" \ -e "read regex @re\"common/polderland/RCmpnd-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" ; " \ -e "define sgnomcmp" \ -e "read regex @re\"common/polderland/N-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" ; " \ -e "define sggencmp" \ -e "read regex @re\"common/polderland/N-Pl-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" ; " \ -e "define plgencmp" \ -e "read regex @re\"common/polderland/N-Sg-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" ; " \ -e "define sggencmpx" \ -e "read regex @re\"common/polderland/N-Pl-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" ; " \ -e "define plgencmpx" \ -e "read regex @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ - [ none | last \ | sgnom | sggen | plgen \ | sgnomcmp | sggencmp | plgencmp \ | sggencmpx | plgencmpx ]; " \ -e "define otherforms" \ -e "read regex none [{ NI} ]; " \ -e "read regex last [{ NePE} ]; " \ -e "read regex sgnom [{ NePIE,VaE} ]; " \ -e "read regex sggen [{ NePIE,VaE} ]; " \ -e "read regex plgen [{ NePIE,VaE} ]; " \ -e "read regex sgnom [{- WIX} ]; " \ -e "read regex sgnom [{- NB,GaB,NePABO} ]; " \ -e "read regex sggen [{- NePIEX,JuBO} ]; " \ -e "read regex plgen [{- NePIEX,JuBO} ]; " \ -e "read regex sggencmpx [{ NePIE} ]; " \ -e "read regex sggencmpx [{- NIX,NePABO,NePEX} ]; " \ -e "read regex plgencmpx [{ NePIE} ]; " \ -e "read regex plgencmpx [{- NIX,NePABO,NePEX} ]; " \ -e "read regex otherforms [{ NePIE} ]; " \ -e "union net" \ -e "turn stack" \ -e "load stack < common/bin/usage-tags-remove.fst" \ -e "compose net" \ -e "save stack $@" \ -stop spellernums: $(GTLANG)/bin/spellernums-$(GTLANG).fst $(GTLANG)/bin/spellernums-$(GTLANG).fst: \ $(GTLANG)/bin/plxnonrec-$(GTLANG).fst \ common/bin/num-filter.fst @echo @echo "*** Building $(@F) ***" ; @echo $(CFST) -e "read regex @\"common/bin/num-filter.fst\" \ .o. @\"$(GTLANG)/bin/plxnonrec-$(GTLANG).fst\" ; " \ -e "save stack $@" \ -stop spellernums-plx: $(GTLANG)/bin/spellernums-$(GTLANG)-plx.fst $(GTLANG)/bin/spellernums-$(GTLANG)-plx.fst: \ $(GTLANG)/bin/spellernums-$(GTLANG).fst \ common/polderland/num-to-NA.regex @echo @echo "*** Building $(@F) ***" ; @echo $(CFST) -e "read regex @re\"common/polderland/num-to-NA.regex\" \ .o. @\"$(GTLANG)/bin/spellernums-$(GTLANG).fst\" ; " \ -e "save stack $@" \ -stop #################################################################### # TeX Hyphenation building #################################################################### # Modify the input transducer, print a random list of hyphenated word forms: hyphenated-wordlist: $(GTLANG)/bin/hyphenated-wordlist.dic $(GTLANG)/bin/hyphenated-wordlist.dic: \ $(GTLANG)/bin/plxnonrec-$(GTLANG).fst \ common/hytex/hyphen-symbol-transform.regex \ common/hytex/extract-hyphenated-words.regex @echo @echo "*** Building $(@F) ***" ; @echo $(XFST) -utf8 -s $< \ -e "define FullLexicon" \ -e "read regex @re\"common/hytex/extract-hyphenated-words.regex\" ; " \ -e "define HyphenFilter" \ -e "read regex FullLexicon .o. HyphenFilter ;" \ -e "define Lexicon" \ -e "read regex @re\"common/hytex/hyphen-symbol-transform.regex\" ; " \ -e "define HyphSymbols" \ -e "read regex Lexicon .o. HyphSymbols ;" \ -e "lower-side net" \ -e "print random-words 150000 > $@" \ -stop # Build a TeX pattern file based on the geneated, hyphenated word form list: texpatterns: $(GTLANG)/hytex/$(GTLANG)-texhyph.dic $(GTLANG)/hytex/$(GTLANG)-texhyph.dic: \ $(GTLANG)/bin/hyphenated-wordlist.dic \ $(GTLANG)/hytex/$(GTLANG).tra @echo @echo "*** Building $(@F) ***" ; @echo touch $@ cp -f $@ $(GTLANG)/hytex/$(GTLANG).pat # patgen dictionary pattern output translate # ../tools/patlib/opatgen -u8 $< /dev/null $@ /dev/null patgen $< $(GTLANG)/hytex/$(GTLANG).pat $@ $(GTLANG)/hytex/$(GTLANG).tra # Transform the TeX hyphenation pattern file to one usable by OOo and others: ooohyph: $(GTLANG)/hytex/hyph_$(GTLANG).dic $(GTLANG)/hytex/hyph_$(GTLANG).dic: $(GTLANG)/hytex/$(GTLANG)-texhyph.dic @echo @echo "*** Building OOo $(@F) ***" ; @echo perl ../tools/hyphen-2.8.3/substrings.pl $< $@ UTF-8 2 2 #################################################################### # Testing targets #################################################################### # PLX conversion testing: plx-conv-test: $(GTLANG)/polderland/testing/words-accept.txt \ $(GTLANG)/polderland/testing/words-reject.txt touch userdict $(SPELL) -u8 -0 -d -m $(GTLANG)/polderland/$(WINSPELL) \ < $(GTLANG)/polderland/testing/words-accept.txt \ > $(GTLANG)/polderland/testing/words-accept.actual-out.txt $(SPELL) -u8 -0 -d -m $(GTLANG)/polderland/$(WINSPELL) \ < $(GTLANG)/polderland/testing/words-reject.txt \ > $(GTLANG)/polderland/testing/words-reject.actual-out.txt # | grep -v ' ' \ rm -f userdict # Cleaning: speller-clean: clean @rm -f $(GTLANG)/polderland/$(WINSPELL) @rm -f $(GTLANG)/polderland/$(MACSPELL) @rm -f $(GTLANG)/polderland/generated_nums-plx.txt @rm -f $(PLXSRCfst) @rm -rf tmp/* @rm -f $(GTLANG)/int/*spel @rm -f $(GTLANG)/hunspell/*$(GTLANG).txt @rm -f userdict