0

I have the output of my parser as something like this:

[S[F[NP[DT your][N offer]][VP[V is][ADJ good]]][NO sonny]]

And I need to convert it to an image of a graph with the syntax tree, something similar to what this site(http://mshang.ca/syntree/) would generate.

Is there any library that could be helpful or that would automatically do that for me ? I need this to run local, so i can't scrap the site and save the image.

1 Answers1

0

Is ASCII adequate?

Example cut from newly released Parsey McParseface:

Input: Bob brought the pizza to Alice .
Parse:
brought VBD ROOT
 +-- Bob NNP nsubj
 +-- pizza NN dobj
 |   +-- the DT det
 +-- to IN prep
 |   +-- Alice NNP pobj
 +-- . . punct

Code is here: A program to generate ASCII trees from conll files.

Doug Shore
  • 771
  • 8
  • 9