# Here we build d-sme.fst, the morphological tagger geared towards # disambiguation. disamb.fst: $(TARGET)/bin/d-$(TARGET).fst $(TARGET)/bin/d-$(TARGET).fst: \ common/bin/dis-tag.fst \ $(TARGET)/bin/$(TARGET).fst @echo @echo "*** Building d-$(TARGET).fst, $(TARGET).fst w/ tags for disambiguation ***" @echo @printf "read regex [[@\"$<\"] .o. \ [@\"$(TARGET)/bin/$(TARGET).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: $(TARGET)/bin/$(TARGET)-dis.bin $(TARGET)/bin/$(TARGET)-dis.bin: $(TARGET)/src/$(TARGET)-dis.rle @echo @echo "*** Building $(TARGET)-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 $(TARGET)/src/$(TARGET)-dis.rle \ --grammar-only --grammar-bin $(TARGET)/bin/$(TARGET)-dis.bin dep-bin: $(TARGET)/bin/$(TARGET)-dep.bin $(TARGET)/bin/$(TARGET)-dep.bin: $(TARGET)/src/$(TARGET)-dep.rle @echo @echo "*** Building $(TARGET)-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 $(TARGET)/src/$(TARGET)-dep.rle \ --grammar-only --grammar-bin $(TARGET)/bin/$(TARGET)-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-$(TARGET).txt tmp/distest-$(TARGET).txt: $(TARGET)/corp/correct/testkorpus.lo.corr.txt \ $(TARGET)/corp/correct/testkorpus.dis.corr.txt \ $(TARGET)/src/$(TARGET)-dis.rle cat $< | lookup2cg \ | vislcg3 -g $(TARGET)/src/$(TARGET)-dis.rle > $@ diff $(TARGET)/corp/correct/testkorpus.dis.corr.txt $@ | see deptest: tmp/deptest-$(TARGET).txt tmp/deptest-$(TARGET).txt: $(TARGET)/corp/correct/testkorpus.lo.corr.txt \ $(TARGET)/corp/correct/testkorpus.dis.corr.txt \ $(TARGET)/corp/correct/testkorpus.dep.corr.txt \ $(TARGET)/src/$(TARGET)-dis.rle \ $(TARGET)/src/$(TARGET)-dep.rle lookup2cg $< \ | vislcg3 -g $(TARGET)/src/$(TARGET)-dis.rle \ | vislcg3 -g $(TARGET)/src/$(TARGET)-dep.rle > $@ diff $(TARGET)/corp/correct/testkorpus.dep.corr.txt $@ | see