I just published the code for a new Java tree processor that is a tree reader that processes syntactic parse trees as generated by constituent parsers, including Lexical functional Grammar (LFG) c-structures or parse trees that have been generated by Probabilistic Context-free Grammar (PCFG) parsers.

Such parsers generate syntactic structures for natural language sentences encode scope relations between constituents, dominance, c-command, and linear order or precedence relations.

They also encode the syntactic production rules of a grammar that is necessary to parse or generate such natural language sentences. By analyzing the tree we can extract and uantify the rules, as well as reconstruct the hierarchical and linear relations of words and syntactic constituents.

There are various ways to encode such trees in form of textual representations. A popular one is to use a bracketed notation with either round or square brackets. The tree structure above could be encoded using square brackets as:

[S [N John ] [VP [V hit ] [NP [D the ] [N ball ] ] ] ]

TreeProcessor converts bracketed annotation syntax trees that are often the output of Natural Language Processing (NLP) tools to a set of syntactic phrase structure rules with quantification, that is generating a PCFG. It also computes all relations between nodes in the tree, in particular dominance relations, government, scope, c-command, and precedence. For each single node with its generated ID one can query structural information that is relevant for various NLP tasks and deeper Natural Language Understanding (NLU).

See for more details: