This package provides a representation of dependency graphs (normally the collapsed Stanford Dependencies representation) as a graph (backed by the jgrapht graph library.
To create a typed dependency graph, a SemanticGraph
from a parse tree,
import edu.stanford.nlp.trees.semgraph.*; ... Tree treeParse = processSentence(sentence); SemanticGraph depGraph = SemanticGraphFactory.allTypedDependencies(treeParse, true);