Re: Is there a way to present Prolog natural language parsing results in a tree form?

Jiun-Shiung Wu <[email protected]> Tue, 8 Apr 2014 12:16:11 +0800
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <CALvsX_LnNG_FaWy4Ys3oKJHQObYSFhmeJsE3PjmaGLmf5Te4Pg@mail.gmail.com>
Thank you for the response! I will take a look at the provided link
immediately.

By "tree", I mean a tree diagram that can be found in any syntax book,
something like:

      s
   /      \
np      vp
|          |    \
propP v      np
|          |       |   \
john   kicked det n
                     |    |
                   a   dog

I apologize if the above tree goes awry.





2014-04-08 12:04 GMT+08:00 Richard A. O'Keefe <[email protected]>:

>
> On 8/04/2014, at 2:30 PM, Jiun-Shiung Wu wrote:
>
> > According to the Prolog books I have, the parsing result of a natural
> > language sentence is like: (np(propN(john)), vp(v(hit), np(det(a),
> > n(dog)))). I am wondering whether there is a way to transform parsing
> > result of this type into a tree form, like the way the structure of a
> > sentence is presented in a syntax book?
>
>
> That *is* a tree.
>
> So what do you actually mean?
>
> It's pretty straightforward to write a command
> to write a tree out using LaTeX.  There are several
> packages that can be used to print parse trees nicely.
>
> http://tex.stackexchange.com/questions/5447/how-can-i-draw-simple-trees-in-latex
>
> It's also pretty straightforward to write a command
> to write a tree out in 'dot' format.
>
>
>
-------------- next part --------------
HTML attachment scrubbed and removed