I want to generate a parse tree(Java Object) from a parse description(Condensed Form of a syntactic parse) of an English sentence. I am using Java for the same and need to define an efficient tree too. Eg. of description :
(ROOT (S (NP (PRP I)) (VP (MD would) (VP (VB love) (S (VP (TO to) (VP (VB go) (PRT (RP out)) (PP (IN with) (NP (PRP you)))))))) (. .))
I finally worked it out myself 🙂