A {@code GrammaticalStructure} stores dependency relations betweennodes in a tree. A new
GrammaticalStructure
is constructed from an existing parse tree with the help of {@link GrammaticalRelation
GrammaticalRelation
}, which defines a hierarchy of grammatical relations, along with patterns for identifying them in parse trees. The constructor for
GrammaticalStructure
uses these definitions to populate the new
GrammaticalStructure
with as many labeled grammatical relations as it can. Once constructed, the new
GrammaticalStructure
can be printed in various formats, or interrogated using the interface methods in this class. Internally, this uses a representation via a {@code TreeGraphNode}, that is, a tree with additional labeled arcs between nodes, for representing the grammatical relations in a parse tree.
Caveat emptor! This is a work in progress. Nothing in here should be relied upon to function perfectly. Feedback welcome.
@author Bill MacCartney
@author Galen Andrew (refactoring English-specific stuff)
@author Ilya Sherman (dependencies)
@author Daniel Cer
@see EnglishGrammaticalRelations
@see GrammaticalRelation
@see EnglishGrammaticalStructure