def read_file(self, empty_first=True):
        if empty_first: 
            self.clear()

        try:
            f = nltk.data.find(
                os.path.join('grammars', 'sample_grammars', self.filename))
            # if f is a ZipFilePathPointer or a FileSystemPathPointer
            # then we need a little extra massaging
            if hasattr(f, 'open'):
                f = f.open()
        except LookupError, e:
            try:
                f = open(self.filename)
            except LookupError:
                raise e
        lines = f.readlines()
        f.close()

        for line in lines:                          # example: 'n : (\\x.(<word> x), (v-or))'
                                                    #     lambdacalc -^  linear logic -^
            line = line.strip()                     # remove trailing newline
            if not len(line): continue              # skip empty lines
            if line[0] == '#': continue             # skip commented out lines

            parts = line.split(' : ', 2)            # ['verb', '(\\x.(<word> x), ( subj -o f ))', '[subj]']