Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.prolog Subject: Re: Tree drawing Message-ID: <4791@goanna.cs.rmit.oz.au> Date: 19 Feb 91 12:20:10 GMT References: <1991Feb16.035944.3055@athena.cs.uga.edu> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 18 In article <1991Feb16.035944.3055@athena.cs.uga.edu>, mcovingt@athena.cs.uga.edu (Michael A. Covington) writes: > Has anyone written a routine to display a Prolog structure in > tree form, ... for example s(np(d(the),n(dog)),vp(v(barked))) The Quintus library provides several ways of displaying trees, but rotated by 90 degrees from what you want. The basic problem is that s(np(d(the),n(dog)),vp(v(barked))) is not a very good way of representing a parse tree, except for toy programs and tiny illustrations. (You really should allow for non-atomic category labels.) "Rotated" pictures s +-- np | +-- d the | +-- n dog +-- vp +-- v barked are quite easy to print, and rather easier to find your way around. -- Professional programming is paranoid programming