It is useful to display parse trees graphically. This representation will provide a more intuitive understanding of the tree. For example, consider the following sentence:
The old man sat down beside the tree.
One possible parse tree for this sentence displayed textually is shown next:
(TOP (S (NP (DT The) (JJ old) (NN man)) (VP (VBD sat) (ADVP (RB down)) (PP (IN beside) (NP (DT the) (NN tree.))))))
This is confusing. We can always reformat the tree to give it a more readable structure as illustrated with the following:
(TOP
(S
(NP (DT The) (JJ old) (NN man))
(VP (VBD sat)
(ADVP (RB down))
(PP (IN beside)
(NP (DT the) (NN tree.))
)
)
)
)
However, it is even better if we use a graphic. In this recipe, we will demonstrate how to use the Stanford NLP API Parser class...