Example usage for Java edu.stanford.nlp.semgraph SemanticGraph fields, constructors, methods, implement or subclass
The text is from its open source code.
SemanticGraph(SemanticGraph g) Returns a new SemanticGraph which is a copy of the supplied SemanticGraph. | |
SemanticGraph(Collection This is the constructor used by the parser. | |
SemanticGraph() |
List | childPairs(IndexedWord vertex) Returns a list of pairs of a relation name and the child IndexedFeatureLabel that bears that relation. |
Set | descendants(IndexedWord vertex) Returns the set of descendants governed by this node in the graph. |
Iterable | edgeIterable() |
List | edgeListSorted() Returns an ordered list of edges in the graph. |
List | getChildList(IndexedWord vertex) |
Set | getChildren(IndexedWord vertex) |
Set | getChildrenWithReln(IndexedWord vertex, GrammaticalRelation reln) Returns a set of all children bearing a certain grammatical relation, or an empty set if none. |
Set | getChildrenWithRelns(IndexedWord vertex, Collection Returns a set of all children bearing one of a set of grammatical relations, or an empty set if none. |
IndexedWord | getChildWithReln(IndexedWord vertex, GrammaticalRelation reln) Returns the first IndexedFeatureLabel bearing a certain grammatical relation, or null if none. |
SemanticGraphEdge | getEdge(IndexedWord gov, IndexedWord dep) |
IndexedWord | getFirstRoot() Returns the (first) root of this SemanticGraph. |
List | getIncomingEdgesSorted(IndexedWord vertex) |
IndexedWord | getNodeByIndexSafe(int index) Same as above, but returns null if the index does not exist (instead of throwing an exception). |
IndexedWord | getNodeByWordPattern(String pattern) Returns the first edu.stanford.nlp.ling.IndexedWord IndexedWord in this SemanticGraph having the given word or regex, or return null if no such found. |
IndexedWord | getParent(IndexedWord vertex) Return the real syntactic parent of vertex. |
Set | getParents(IndexedWord vertex) |
List | getPathToRoot(IndexedWord vertex) Find the path from the given node to a root. |
Collection | getRoots() |
List | getShortestDirectedPathEdges(IndexedWord source, IndexedWord target) |
List | getShortestUndirectedPathEdges(IndexedWord source, IndexedWord target) |
boolean | hasChildWithReln(IndexedWord vertex, GrammaticalRelation reln) Does the given vertex have at least one child with the given reln ? |
int | inDegree(IndexedWord vertex) |
List | outgoingEdgeList(IndexedWord v) |
int | size() Returns the number of nodes in the graph |
String | toCompactString() |
String | toList() Returns a String representation of this graph as a list of typed dependencies, as exemplified by the following: nsubj(died-6, Sam-3) tmod(died-6, today-9) |
String | toString(CoreLabel.OutputFormat wordFormat) |
String | toString(OutputFormat format) Returns a String representation of the result of this set of typed dependencies in a user-specified format. |
String | toString() Recursive depth first traversal. |
Collection | typedDependencies() Returns a list of TypedDependency in the graph. |
SemanticGraph | valueOf(String s) |
List | vertexListSorted() This returns an ordered list of vertices (based upon their indices in the sentence). |
Set | vertexSet() |