Re: Is there a way to present Prolog natural language parsing results in a tree form?
"Richard A. O'Keefe" <[email protected]> Tue, 8 Apr 2014 16:04:17 +1200
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[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.