#!/bin/sh # Usage: parseattrs foo.gra foo.sen # where foo.gra is a grammar file and foo.sen is a file of sentences # # The temporary files temp.gr and temp.par are not deleted, in case # you want to look at them. ./delattrs $1 > temp.gr && # produce an attributeless version of the grammar ./checkvocab temp.gr $2 && # warn user and stop if input has out-of-vocab words ./parse temp.gr $2 > temp.par && # parse sentences using this attributeless grammar ./buildattrs $1 temp.par # attach attributes to the parses