sinclude $(GTLANG)/disamb.mk # Here we build d-sme.fst, the morphological tagger geared towards # disambiguation. disamb.fst: $(GTLANG)/bin/d-$(GTLANG).fst $(GTLANG)/bin/d-$(GTLANG).fst: \ common/bin/dis-tag.fst \ $(GTLANG)/bin/$(GTLANG).fst @echo @echo "*** Building d-$(GTLANG).fst, $(GTLANG).fst w/ tags for disambiguation ***" @echo @printf "read regex [[@\"$<\"] .o. \ [@\"$(GTLANG)/bin/$(GTLANG).fst\"]] ; \n\ save stack $@ \n\ quit \n" > tmp/disamb-fst-script $(XFST) < tmp/disamb-fst-script @rm -f tmp/disamb-fst-script # We want to make a parser with tags for parsing. # In order to get that we make a tag modifier dis-tag.fst: common/bin/dis-tag.fst common/bin/dis-tag.fst: common/src/dis-tag.txt @echo @echo "*** Building the tag manipulator dis-tag.fst ***" ; @echo @printf "source $< \n\ save stack $@ \n\ quit \n" > tmp/dis-tag-sme-script $(XFST) < tmp/dis-tag-sme-script @rm -f tmp/dis-tag-sme-script dis-bin: $(GTLANG)/bin/$(GTLANG)-dis.bin $(GTLANG)/bin/$(GTLANG)-dis.bin: $(GTLANG)/src/$(GTLANG)-dis.rle @echo @echo "*** Building $(GTLANG)-dis.bin ***" @echo "Note: This requires a relatively new vislcg3 file." @echo "The morphological parsers are not affected if you" @echo "fail to build this file, it is for disambiguation." @echo @echo $(VISLCG3) -g $(GTLANG)/src/$(GTLANG)-dis.rle \ --grammar-only --grammar-bin $(GTLANG)/bin/$(GTLANG)-dis.bin dep-bin: $(GTLANG)/bin/$(GTLANG)-dep.bin $(GTLANG)/bin/$(GTLANG)-dep.bin: $(GTLANG)/src/$(GTLANG)-dep.rle @echo @echo "*** Building $(GTLANG)-dep.bin ***" @echo "Note: This requires a relatively new vislcg3 file." @echo "The morphological parsers are not affected if you" @echo "fail to build this file, it's for dependency syntax." @echo $(VISLCG3) --grammar $(GTLANG)/src/$(GTLANG)-dep.rle \ --grammar-only --grammar-bin $(GTLANG)/bin/$(GTLANG)-dep.bin ##################################### # Targets to test CG "products" ##################################### # A general target, to run all CG tests at once (add more dependent # targets as they become available): cgtests: cgtest cgtest: distest deptest distest: tmp/distest-$(GTLANG).txt tmp/distest-$(GTLANG).txt: $(GTLANG)/corp/correct/testkorpus.lo.corr.txt \ $(GTLANG)/corp/correct/testkorpus.dis.corr.txt \ $(GTLANG)/src/$(GTLANG)-dis.rle cat $< | lookup2cg \ | vislcg3 -g $(GTLANG)/src/$(GTLANG)-dis.rle > $@ diff $(GTLANG)/corp/correct/testkorpus.dis.corr.txt $@ | see deptest: tmp/deptest-$(GTLANG).txt tmp/deptest-$(GTLANG).txt: $(GTLANG)/corp/correct/testkorpus.lo.corr.txt \ $(GTLANG)/corp/correct/testkorpus.dis.corr.txt \ $(GTLANG)/corp/correct/testkorpus.dep.corr.txt \ $(GTLANG)/src/$(GTLANG)-dis.rle \ $(GTLANG)/src/$(GTLANG)-dep.rle lookup2cg $< \ | vislcg3 -g $(GTLANG)/src/$(GTLANG)-dis.rle \ | vislcg3 -g $(GTLANG)/src/$(GTLANG)-dep.rle > $@ diff $(GTLANG)/corp/correct/testkorpus.dep.corr.txt $@ | see