sinclude $(GTLANG)/polderland.mk plx-conversion: lexc2xspell $(PLXSRCjava) $(PLXSRCprefix) $(PLXSRCjava): $(SRCS) lexc2xspell $(GTLANG)/src/num-$(GTLANG)-lex.txt @echo @echo "*** Creating $(GTLANG) PLX files ***" @echo java -cp src/lexc2xspell/build Lexc2xspell \ $(patsubst $(GTLANG)/polderland/%-plx.txt,$(GTLANG)/src/%-lex.txt,$@) \ `pwd`/$(GTLANG)/bin/hi$(GTLANG)-norm.fst \ | sed -e 's/-/--/g' -e 's/\^/-/g' -e 's/#/-/g' | uniq > $@ $(PLXSRCprefix): $(PLXJavaMiddle) @echo @echo "*** Creating $(GTLANG) PLX prefix file ***" @echo java -cp src/lexc2xspell/build Lexc2xspell \ $(GTLANG)/src/$(GTLANG)-lex.txt \ `pwd`/$(GTLANG)/bin/hi$(GTLANG)-norm.fst \ | sed -e 's/-/--/g' -e 's/\^/-/g' -e 's/#/-/g' | uniq > $@ java -cp src/lexc2xspell/build Lexc2xspell \ $(GTLANG)/src/noun-$(GTLANG)-lex.txt \ `pwd`/$(GTLANG)/bin/hi$(GTLANG)-norm.fst \ | sed -e 's/-/--/g' -e 's/\^/-/g' -e 's/#/-/g' | uniq >> $@ lexc2xspell: ant -buildfile src/lexc2xspell/build.xml # Before we compile the plx speller lexicon, we collect all pieces and rev-sort them: tmp/all-plx-$(GTLANG).revsorted: \ plx-conversion \ victorio-co \ common/polderland/version.plx \ ms-speller-version \ $(GTLANG)/polderland/propernoun-$(GTLANG)-plx.txt \ $(GTLANG)/polderland/noun-$(GTLANG)-plx.txt \ $(GTLANG)/polderland/adj-$(GTLANG)-plx.txt \ $(GTLANG)/polderland/verb-$(GTLANG)-plx.txt @echo @echo "*** Sorting $(GTLANG) files ***" @echo @if [ ! -d tmp/$(GTLANG) ]; then \ mkdir tmp/$(GTLANG) ; \ fi @LC_ALL=C sort -T tmp/$(GTLANG) -ur -o $@ \ tmp/$(GTLANG)-version.plx \ common/polderland/version.plx \ $(PLXSRCjava) $(PLXSRCsuffix) $(PLXSRCprefix) $(PLXSRCfst) # Target for making MS Office speller lexicons. It depends on compilers # from Polderland, only available on the Divvun project computers # First, a general speller target: ms-speller: ms-win-speller ms-mac-speller # We make the Windows speller first, the Mac speller is the same with # some Mac-Office specific resources: ms-win-speller: $(GTLANG)/polderland/$(WINSPELL) $(GTLANG)/polderland/$(WINSPELL): common/polderland/version.phon \ tmp/all-plx-$(GTLANG).revsorted @echo @echo "*** cat-ing $(GTLANG) phon files ***" @echo @cat $(GTLANG)/polderland/phonrules-$(GTLANG).txt \ common/polderland/version.phon \ tmp/$(GTLANG)-version.phon > tmp/$(GTLANG)-phon.txt @echo @echo "*** Compiling $(GTLANG) M$$ speller lexicon ***" @echo $(MKLEX) -M512 -p tmp/$(GTLANG)-phon.txt tmp/all-plx-$(GTLANG).revsorted $@ # The Mac-Office speller depends on the Windows speller ms-mac-speller: $(GTLANG)/polderland/$(MACSPELL) $(GTLANG)/polderland/$(MACSPELL): $(GTLANG)/polderland/$(WINSPELL) \ $(GTLANG)/polderland/$(RSRCFILE) @echo @echo "*** Creating $(GTLANG) speller, Mac-version - adding resources ***" @echo /bin/cp $(GTLANG)/polderland/$(WINSPELL) $@ $(REZ) $(GTLANG)/polderland/$(RSRCFILE) -a -o $@ $(SETFILE) -a CI -c MSOF -t HMSD $@ # Version easter egg generation: ms-speller-version: @echo @echo "*** Creating $(GTLANG) M$$ speller version info easter egg ***" @echo script/prooftools/add-version-info.pl \ --lang=$(GTLANG) \ --version=$(GTLANG)/polderland/version.txt \ --plxfile=tmp/$(GTLANG)-version.plx \ --phonfile=tmp/$(GTLANG)-version.phon # Check out gt catalogue in victorio to make sure we have the latest & greatest # sources victorio-co: @echo @echo "*** Checking out gt in victorio ***" @echo $(SSH) victorio.uit.no "rm -rf speller-$(GTLANG)" $(SSH) victorio.uit.no "mkdir speller-$(GTLANG) && cd speller-$(GTLANG) && svn co https://victorio.uit.no/repos/trunk/gt && chmod 755 gt/script/*" # Here we make a full-form verb file # It requires network access to victorio.uit.no. verblist: $(GTLANG)/polderland/verb-$(GTLANG)-plx.txt $(GTLANG)/polderland/verb-$(GTLANG)-plx.txt: @echo @echo "*** Building $(GTLANG) full-form verb list in PLX format ***" @echo @rm -f $@ @printf "load stack < $(GTLANG)/bin/spellerverbs-$(GTLANG)-plx.fst \n\ load stack < common/bin/hyphen-convert.fst \n\ turn stack \n\ compose net \n\ lower-side \n\ print words \n\ quit \n" > tmp/verblist-$(GTLANG)-script $(SCP) tmp/verblist-$(GTLANG)-script victorio.uit.no:speller-$(GTLANG)/gt/tmp/ $(SSH) victorio.uit.no "cd speller-$(GTLANG)/gt && make GTLANG=$(GTLANG) common/bin/hyphen-convert.fst" $(SSH) victorio.uit.no "cd speller-$(GTLANG)/gt && make GTLANG=$(GTLANG) $(GTLANG)/bin/spellerverbs-$(GTLANG)-plx.fst" $(SSH) victorio.uit.no "cd speller-$(GTLANG)/gt && $(UFST) -f tmp/verblist-$(GTLANG)-script -q" > $@ @rm -f tmp/verblist-$(GTLANG)-script # Here we make a full-form adj file # It requires network access to victorio.uit.no. adjlist: $(GTLANG)/polderland/adj-$(GTLANG)-plx.txt $(GTLANG)/polderland/adj-$(GTLANG)-plx.txt: @echo @echo "*** Building $(GTLANG) full-form adj list in PLX format ***" @echo @rm -f $@ @printf "load stack < $(GTLANG)/bin/spelleradjs-$(GTLANG)-plx.fst \n\ load stack < common/bin/hyphen-convert.fst \n\ turn stack \n\ compose net \n\ lower-side \n\ print words \n\ quit \n" > tmp/adjlist-$(GTLANG)-script $(SCP) tmp/adjlist-$(GTLANG)-script victorio.uit.no:speller-$(GTLANG)/gt/tmp/ $(SSH) victorio.uit.no "cd speller-$(GTLANG)/gt && make GTLANG=$(GTLANG) common/bin/hyphen-convert.fst" $(SSH) victorio.uit.no "cd speller-$(GTLANG)/gt && make GTLANG=$(GTLANG) $(GTLANG)/bin/spelleradjs-$(GTLANG)-plx.fst" $(SSH) victorio.uit.no "cd speller-$(GTLANG)/gt && $(UFST) -f tmp/adjlist-$(GTLANG)-script -q" > $@ @rm -f tmp/adjlist-$(GTLANG)-script # Here we make a full-form noun file # It requires network access to victorio.uit.no. nounlist: $(GTLANG)/polderland/noun-$(GTLANG)-plx.txt $(GTLANG)/polderland/noun-$(GTLANG)-plx.txt: @echo @echo "*** Building $(GTLANG) full-form noun list in PLX format ***" @echo @rm -f $@ @printf "load stack < $(GTLANG)/bin/spellernouns-$(GTLANG)-plx.fst \n\ load stack < common/bin/hyphen-convert.fst \n\ turn stack \n\ compose net \n\ lower-side \n\ print words \n\ quit \n" > tmp/nounlist-$(GTLANG)-script $(SCP) tmp/nounlist-$(GTLANG)-script victorio.uit.no:speller-$(GTLANG)/gt/tmp/ $(SSH) victorio.uit.no "cd speller-$(GTLANG)/gt && make GTLANG=$(GTLANG) common/bin/hyphen-convert.fst" $(SSH) victorio.uit.no "cd speller-$(GTLANG)/gt && make GTLANG=$(GTLANG) $(GTLANG)/bin/spellernouns-$(GTLANG)-plx.fst" $(SSH) victorio.uit.no "cd speller-$(GTLANG)/gt && $(UFST) -f tmp/nounlist-$(GTLANG)-script -q" > $@ @rm -f tmp/nounlist-$(GTLANG)-script # Here we make a full-form propernoun file # It requires network access to victorio.uit.no. properlist: $(GTLANG)/polderland/propernoun-$(GTLANG)-plx.txt $(GTLANG)/polderland/propernoun-$(GTLANG)-plx.txt: @echo @echo "*** Building $(GTLANG) full-form propernoun list in PLX format ***" @echo @rm -f $@ @printf "load stack < $(GTLANG)/bin/spellerproper-$(GTLANG)-plx.fst \n\ load stack < common/bin/hyphen-convert.fst \n\ turn stack \n\ compose net \n\ lower-side \n\ print words \n\ quit \n" > tmp/properlist-$(GTLANG)-script $(SCP) tmp/properlist-$(GTLANG)-script victorio.uit.no:speller-$(GTLANG)/gt/tmp/ $(SSH) victorio.uit.no "cd speller-$(GTLANG)/gt && make GTLANG=$(GTLANG) common/bin/hyphen-convert.fst" $(SSH) victorio.uit.no "cd speller-$(GTLANG)/gt && make GTLANG=$(GTLANG) $(GTLANG)/bin/spellerproper-$(GTLANG)-plx.fst" $(SSH) victorio.uit.no "cd speller-$(GTLANG)/gt && $(UFST) -f tmp/properlist-$(GTLANG)-script -q" > $@ @rm -f tmp/properlist-$(GTLANG)-script # ==================================================== # # Building speller transducers for specific POSes only # # ==================================================== # # 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/spellernonrec-$(GTLANG).fst \ common/bin/tag-inclusion-filter.fst \ $(TAGINCL) @echo @echo "*** Building spellerverbs-$(GTLANG).fst ***" ; @echo @printf "read regex @re\"common/src/verb-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernonrec-$(GTLANG).fst\" ;\n" \ > tmp/spellerverbs-$(GTLANG)-script @printf "read regex @re\"common/src/verb-TV-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernonrec-$(GTLANG).fst\" ;\n" \ >> tmp/spellerverbs-$(GTLANG)-script @printf "read regex @re\"common/src/verb-IV-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernonrec-$(GTLANG).fst\" ;\n" \ >> tmp/spellerverbs-$(GTLANG)-script @printf "union net \n\ load stack < common/bin/tag-inclusion-filter.fst \n\ turn stack \n\ compose net \n" >> tmp/spellerverbs-$(GTLANG)-script @printf "save stack $@ \n" >> tmp/spellerverbs-$(GTLANG)-script @printf "quit \n" >> tmp/spellerverbs-$(GTLANG)-script $(CFST) < tmp/spellerverbs-$(GTLANG)-script @rm -f tmp/spellerverbs-$(GTLANG)-script 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 @printf "read regex @re\"common/src/V-Actio-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerverbs-$(GTLANG).fst\" ; \n \ define actio \n\ read regex @\"$(GTLANG)/bin/spellerverbs-$(GTLANG).fst\" \ - actio; \n \ define noactio \n\ read regex noactio [{ VI}];\n \ read regex actio [{ VIBOE}];\n" > tmp/spellerverbs-$(GTLANG)-plx-script @printf "read regex @re\"common/src/V-Inf-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerverbs-$(GTLANG).fst\" \ [{- NIBX}];\n" >> tmp/spellerverbs-$(GTLANG)-plx-script @printf "read regex @re\"common/src/V-PrfPrc-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerverbs-$(GTLANG).fst\" \ [{ NIBE}];\n" >> tmp/spellerverbs-$(GTLANG)-plx-script @printf "union net \n\ load stack < common/bin/tag-inclusion-filter.fst \n\ turn stack \n\ compose net \n\ save stack $@ \n" >> tmp/spellerverbs-$(GTLANG)-plx-script @printf "quit \n" >> tmp/spellerverbs-$(GTLANG)-plx-script $(CFST) < tmp/spellerverbs-$(GTLANG)-plx-script @rm -f tmp/spellerverbs-$(GTLANG)-plx-script spelleradjs: $(GTLANG)/bin/spelleradjs-$(GTLANG).fst $(GTLANG)/bin/spelleradjs-$(GTLANG).fst: \ $(GTLANG)/bin/spellernonrec-$(GTLANG).fst \ $(TAGINCL) @echo @echo "*** Building spelleradjs-$(GTLANG).fst ***" ; @echo @printf "read regex @re\"common/src/adj-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernonrec-$(GTLANG).fst\" ;\n" \ > tmp/spelleradjs-$(GTLANG)-script @printf "save stack $@ \n" >> tmp/spelleradjs-$(GTLANG)-script @printf "quit \n" >> tmp/spelleradjs-$(GTLANG)-script $(CFST) < tmp/spelleradjs-$(GTLANG)-script @rm -f tmp/spelleradjs-$(GTLANG)-script spelleradjs-plx: $(GTLANG)/bin/spelleradjs-$(GTLANG)-plx.fst $(GTLANG)/bin/spelleradjs-$(GTLANG)-plx.fst: \ $(GTLANG)/bin/spelleradjs-$(GTLANG).fst \ common/bin/tag-inclusion-filter.fst @echo @echo "*** Building spelleradjs-$(GTLANG)-plx.fst ***" ; @echo ## Positional tags: # +None @printf "read regex @re\"common/src/N-None-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ NI}];\n" > tmp/spelleradjs-$(GTLANG)-plx-script # +Last @printf "read regex @re\"common/src/N-Last-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ NIE}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script ## Regular tags, without compounding restr.: # +A+Sg+Nom @printf "read regex @re\"common/src/A-Sg-Nom-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ NIE}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script @printf "read regex @re\"common/src/A-Sg-Nom-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{- NBOX}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script # +A+Sg+Gen @printf "read regex @re\"common/src/A-Sg-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ GaIBOE}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script # +A+Pl+Gen @printf "read regex @re\"common/src/A-Pl-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ GpIBOE}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script ## Compound: # +SgCmp, +SgNomCmp @printf "read regex @re\"common/src/A-Sg-Nom-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ NBO}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script @printf "read regex @re\"common/src/A-Sg-Nom-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{- NIE}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script # +SgGenCmp - defaults @printf "read regex @re\"common/src/A-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ GaBO}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script @printf "read regex @re\"common/src/A-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{- GaIE}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script # +PlGenCmp - defaults @printf "read regex @re\"common/src/A-Pl-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ GpBO}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script @printf "read regex @re\"common/src/A-Pl-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{- GpIE}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script # +DefSgGenCmp - defaults @printf "read regex @re\"common/src/A-Def-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ GaBO}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script @printf "read regex @re\"common/src/A-Def-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{- GaIE}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script # +DefPlGenCmp - defaults @printf "read regex @re\"common/src/A-Def-Pl-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ GpBO}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script @printf "read regex @re\"common/src/A-Def-Pl-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{- GpIE}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script # +SgGenCmp - explicit override @printf "read regex @re\"common/src/A-Sg-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ NBO}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script @printf "read regex @re\"common/src/A-Sg-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{- NIE}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script # +PlGenCmp - explicit override @printf "read regex @re\"common/src/A-Pl-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ NBO}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script @printf "read regex @re\"common/src/A-Pl-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{- NIE}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script ## Left part: # +SgLeft, +SgNomLeft @printf "read regex @re\"common/src/A-Sg-Nom-Left-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ NIOE}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script # +SgGenLeft @printf "read regex @re\"common/src/A-Sg-Gen-Left-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ NaIOE}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script # +PlGenLeft @printf "read regex @re\"common/src/A-Pl-Gen-Left-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ NpIOE}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script # +Attr+Cmpnd # @printf "read regex @re\"common/src/A-Attr-Cmp-filter.regex\" \ # .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ # [{- NIALR}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script @printf "read regex @re\"common/src/A-Attr-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ [{ NePABO}];\n" >> tmp/spelleradjs-$(GTLANG)-plx-script @printf "read regex @re\"common/src/A-Attr-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ ; \n\ define allattr \n\ read regex @re\"common/src/A-Attr-Sharp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\"; \n\ define attrder \n\ read regex allattr - attrder; \n\ define attr \n\ read regex attr [{ NIBOE}]; \n" >> tmp/spelleradjs-$(GTLANG)-plx-script @printf "read regex \ ~[ @re\"common/src/A-Sg-Nom-filter.regex\" \ | @re\"common/src/A-Sg-Gen-filter.regex\" \ | @re\"common/src/A-Pl-Gen-filter.regex\" \ | @re\"common/src/N-None-Cmp-filter.regex\" \ | @re\"common/src/N-Last-Cmp-filter.regex\" \ | @re\"common/src/Cmp-filter.regex\" \ | @re\"common/src/A-Sg-Nom-Left-filter.regex\" \ | @re\"common/src/A-Sg-Gen-Left-filter.regex\" \ | @re\"common/src/A-Pl-Gen-Left-filter.regex\" ] \ .o. @\"$(GTLANG)/bin/spelleradjs-$(GTLANG).fst\" \ ;\n\ define adjs \n\ read regex adjs - attr; \n\ define adjectives \n\ read regex adjectives [{ NIE}]; \n" >> tmp/spelleradjs-$(GTLANG)-plx-script @printf "union net \n\ load stack < common/bin/tag-inclusion-filter.fst \n\ turn stack \n\ compose net \n" >> tmp/spelleradjs-$(GTLANG)-plx-script @printf "save stack $@ \n" >> tmp/spelleradjs-$(GTLANG)-plx-script @printf "quit \n" >> tmp/spelleradjs-$(GTLANG)-plx-script $(CFST) < tmp/spelleradjs-$(GTLANG)-plx-script @rm -f tmp/spelleradjs-$(GTLANG)-plx-script spellernouns: $(GTLANG)/bin/spellernouns-$(GTLANG).fst $(GTLANG)/bin/spellernouns-$(GTLANG).fst: \ $(GTLANG)/bin/spellernonrec-$(GTLANG).fst \ $(TAGINCL) @echo @echo "*** Building spellernouns-$(GTLANG).fst ***" ; @echo @printf "read regex @re\"common/src/noun-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernonrec-$(GTLANG).fst\" ;\n" \ > tmp/spellernouns-$(GTLANG)-script @printf "save stack $@ \n" >> tmp/spellernouns-$(GTLANG)-script @printf "quit \n" >> tmp/spellernouns-$(GTLANG)-script $(CFST) < tmp/spellernouns-$(GTLANG)-script @rm -f tmp/spellernouns-$(GTLANG)-script spellernouns-plx: $(GTLANG)/bin/spellernouns-$(GTLANG)-plx.fst $(GTLANG)/bin/spellernouns-$(GTLANG)-plx.fst: \ $(GTLANG)/bin/spellernouns-$(GTLANG).fst \ common/bin/tag-inclusion-filter.fst @echo @echo "*** Building spellernouns-$(GTLANG)-plx.fst ***" ; @echo ## Positional tags: # +None @printf "read regex @re\"common/src/N-None-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ NI}];\n" > tmp/spellernouns-$(GTLANG)-plx-script # +Last @printf "read regex @re\"common/src/N-Last-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ NIE}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script # @printf "read regex @re\"common/src/N-First-Sg-Gen-filter.regex\" \ # .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ # [{ GaIAL}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script # @printf "read regex @re\"common/src/N-First-Pl-Gen-filter.regex\" \ # .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ # [{ GpIAL}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script # TODO: +CmpOnly -filters ## Regular tags, without compounding restr.: # +N+Sg+Nom @printf "read regex @re\"common/src/N-Sg-Nom-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ NIE}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script @printf "read regex @re\"common/src/N-Sg-Nom-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{- NBOX}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script # +N+Sg+Gen @printf "read regex @re\"common/src/N-Sg-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ GaIBOE}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script # +N+Pl+Gen @printf "read regex @re\"common/src/N-Pl-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ GpIBOE}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script ## Compound: # +SgCmp, +SgNomCmp @printf "read regex @re\"common/src/N-Sg-Nom-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ NBO}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script @printf "read regex @re\"common/src/N-Sg-Nom-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{- NIE}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script # +SgGenCmp - defaults @printf "read regex @re\"common/src/N-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ GaBO}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script @printf "read regex @re\"common/src/N-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{- GaIE}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script # +PlGenCmp - defaults @printf "read regex @re\"common/src/N-Pl-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ GpBO}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script @printf "read regex @re\"common/src/N-Pl-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{- GpIE}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script # +DefSgGenCmp - defaults @printf "read regex @re\"common/src/N-Def-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ GaBO}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script @printf "read regex @re\"common/src/N-Def-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{- GaIE}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script # +DefPlGenCmp - defaults @printf "read regex @re\"common/src/N-Def-Pl-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ GpBO}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script @printf "read regex @re\"common/src/N-Def-Pl-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{- GpIE}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script # +SgGenCmp - explicit override @printf "read regex @re\"common/src/N-Sg-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ NBO}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script @printf "read regex @re\"common/src/N-Sg-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{- NIE}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script # +PlGenCmp - explicit override @printf "read regex @re\"common/src/N-Pl-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ NBO}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script @printf "read regex @re\"common/src/N-Pl-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{- NIE}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script ## Left part: # +SgLeft, +SgNomLeft @printf "read regex @re\"common/src/N-Sg-Nom-Left-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ NIOE}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script # +SgGenLeft @printf "read regex @re\"common/src/N-Sg-Gen-Left-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ NaIOE}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script # +PlGenLeft @printf "read regex @re\"common/src/N-Pl-Gen-Left-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ NpIOE}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script @printf "read regex \ ~[ @re\"common/src/N-Sg-Nom-filter.regex\" \ | @re\"common/src/N-Sg-Gen-filter.regex\" \ | @re\"common/src/N-Pl-Gen-filter.regex\" \ | @re\"common/src/N-None-Cmp-filter.regex\" \ | @re\"common/src/N-Last-Cmp-filter.regex\" \ | @re\"common/src/Cmp-filter.regex\" \ | @re\"common/src/N-Sg-Nom-Left-filter.regex\" \ | @re\"common/src/N-Sg-Gen-Left-filter.regex\" \ | @re\"common/src/N-Pl-Gen-Left-filter.regex\" ] \ .o. @\"$(GTLANG)/bin/spellernouns-$(GTLANG).fst\" \ [{ NIE}];\n" >> tmp/spellernouns-$(GTLANG)-plx-script @printf "union net \n\ load stack < common/bin/tag-inclusion-filter.fst \n\ turn stack \n\ compose net \n\ save stack $@ \n\ quit \n" >> tmp/spellernouns-$(GTLANG)-plx-script $(CFST) < tmp/spellernouns-$(GTLANG)-plx-script @rm -f tmp/spellernouns-$(GTLANG)-plx-script spellerproper: $(GTLANG)/bin/spellerproper-$(GTLANG).fst $(GTLANG)/bin/spellerproper-$(GTLANG).fst: \ $(GTLANG)/bin/spellernonrec-$(GTLANG).fst \ $(TAGINCL) @echo @echo "*** Building spellerproper-$(GTLANG).fst ***" ; @echo @printf "read regex @re\"common/src/propernoun-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellernonrec-$(GTLANG).fst\" ;\n" \ > tmp/spellerproper-$(GTLANG)-script @printf "save stack $@ \n" >> tmp/spellerproper-$(GTLANG)-script @printf "quit \n" >> tmp/spellerproper-$(GTLANG)-script $(CFST) < tmp/spellerproper-$(GTLANG)-script @rm -f tmp/spellerproper-$(GTLANG)-script spellerproper-plx: $(GTLANG)/bin/spellerproper-$(GTLANG)-plx.fst $(GTLANG)/bin/spellerproper-$(GTLANG)-plx.fst: \ $(GTLANG)/bin/spellerproper-$(GTLANG).fst \ common/bin/tag-inclusion-filter.fst @echo @echo "*** Building spellerproper-$(GTLANG)-plx.fst ***" ; @echo # +None @printf "read regex @re\"common/src/N-None-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NI}];\n" > tmp/spellerproper-$(GTLANG)-plx-script # +Last @printf "read regex @re\"common/src/N-Last-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NPIE}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script # +N+Sg+Nom @printf "read regex @re\"common/src/Prop-Sg-Nom-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NePI}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script # @printf "read regex @re\"common/src/Prop-Sg-Nom-filter.regex\" \ # .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ # [{- NALX}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "read regex [{-}] [@re\"common/src/Prop-Sg-Nom-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NePE}]];\n" >> tmp/spellerproper-$(GTLANG)-plx-script # +N+Sg+Gen @printf "read regex @re\"common/src/Prop-Sg-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NeAPIB}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "read regex [{-}] [@re\"common/src/Prop-Sg-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NePE}]];\n" >> tmp/spellerproper-$(GTLANG)-plx-script # +N+Pl+Gen @printf "read regex @re\"common/src/Prop-Pl-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NeI}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "read regex [{-}] [@re\"common/src/Prop-Pl-Gen-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NePE}]];\n" >> tmp/spellerproper-$(GTLANG)-plx-script ## Compound: # +SgCmp, +SgNomCmp @printf "read regex @re\"common/src/N-Sg-Nom-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NeAPB}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script # @printf "read regex @re\"common/src/N-Sg-Nom-Cmp-filter.regex\" \ # .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ # [{- NePIB}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "read regex @re\"common/src/N-Sg-Nom-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{- NAPIB}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "read regex [{-}] [@re\"common/src/N-Sg-Nom-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NeAPOE}]];\n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "read regex [{-}] [@re\"common/src/N-Sg-Nom-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{- NAPO}]];\n" >> tmp/spellerproper-$(GTLANG)-plx-script # +SgGenCmp @printf "read regex @re\"common/src/N-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NeI}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "read regex @re\"common/src/N-Sg-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{- NeI}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script # +PlGenCmp @printf "read regex @re\"common/src/N-Pl-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NeI}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "read regex @re\"common/src/N-Pl-Gen-Cmp-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{- NeI}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script # +SgGenCmp - explicit override @printf "read regex @re\"common/src/N-Sg-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NeAPI}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script # @printf "read regex @re\"common/src/N-Sg-Gen-Cmp-X-filter.regex\" \ # .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ # [{- NePIB}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "read regex @re\"common/src/N-Sg-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{- NAPI}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script # +PlGenCmp - explicit override @printf "read regex @re\"common/src/N-Pl-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NeAPI}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script # @printf "read regex @re\"common/src/N-Pl-Gen-Cmp-X-filter.regex\" \ # .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ # [{- NePIB}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "read regex @re\"common/src/N-Pl-Gen-Cmp-X-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{- NAPI}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "read regex @re\"common/src/multiword-filter.regex\" \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ WI}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "read regex \ ~[ @re\"common/src/multiword-filter.regex\" \ | @re\"common/src/N-None-Cmp-filter.regex\" \ | @re\"common/src/N-Last-Cmp-filter.regex\" \ | @re\"common/src/Prop-Sg-Nom-filter.regex\" \ | @re\"common/src/Prop-Sg-Gen-filter.regex\" \ | @re\"common/src/Prop-Pl-Gen-filter.regex\" \ | @re\"common/src/Cmp-filter.regex\" \ | @re\"common/src/N-Sg-Nom-Cmp-filter.regex\" \ | @re\"common/src/N-Sg-Gen-Cmp-filter.regex\" \ | @re\"common/src/N-Pl-Gen-Cmp-filter.regex\" ] \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NePI}];\n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "read regex [{-}] [\ ~[ @re\"common/src/multiword-filter.regex\" \ | @re\"common/src/N-None-Cmp-filter.regex\" \ | @re\"common/src/N-Last-Cmp-filter.regex\" \ | @re\"common/src/Prop-Sg-Nom-filter.regex\" \ | @re\"common/src/Prop-Sg-Gen-filter.regex\" \ | @re\"common/src/Prop-Pl-Gen-filter.regex\" \ | @re\"common/src/Cmp-filter.regex\" \ | @re\"common/src/N-Sg-Nom-Cmp-filter.regex\" \ | @re\"common/src/N-Sg-Gen-Cmp-filter.regex\" \ | @re\"common/src/N-Pl-Gen-Cmp-filter.regex\" ] \ .o. @\"$(GTLANG)/bin/spellerproper-$(GTLANG).fst\" \ [{ NePE}]];\n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "union net \n\ load stack < common/bin/tag-inclusion-filter.fst \n\ turn stack \n\ compose net \n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "save stack $@ \n" >> tmp/spellerproper-$(GTLANG)-plx-script @printf "quit \n" >> tmp/spellerproper-$(GTLANG)-plx-script $(CFST) < tmp/spellerproper-$(GTLANG)-plx-script @rm -f tmp/spellerproper-$(GTLANG)-plx-script