Java edu.stanford.nlp.semgraph SemanticGraph fields, constructors, methods, implement or subclass

Example usage for Java edu.stanford.nlp.semgraph SemanticGraph fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for edu.stanford.nlp.semgraph SemanticGraph.

The text is from its open source code.

Constructor

SemanticGraph(SemanticGraph g)
Returns a new SemanticGraph which is a copy of the supplied SemanticGraph.
SemanticGraph(Collection dependencies)
This is the constructor used by the parser.
SemanticGraph()

Method

List>childPairs(IndexedWord vertex)
Returns a list of pairs of a relation name and the child IndexedFeatureLabel that bears that relation.
Setdescendants(IndexedWord vertex)
Returns the set of descendants governed by this node in the graph.
IterableedgeIterable()
ListedgeListSorted()
Returns an ordered list of edges in the graph.
ListgetChildList(IndexedWord vertex)
SetgetChildren(IndexedWord vertex)
SetgetChildrenWithReln(IndexedWord vertex, GrammaticalRelation reln)
Returns a set of all children bearing a certain grammatical relation, or an empty set if none.
SetgetChildrenWithRelns(IndexedWord vertex, Collection relns)
Returns a set of all children bearing one of a set of grammatical relations, or an empty set if none.
IndexedWordgetChildWithReln(IndexedWord vertex, GrammaticalRelation reln)
Returns the first IndexedFeatureLabel bearing a certain grammatical relation, or null if none.
SemanticGraphEdgegetEdge(IndexedWord gov, IndexedWord dep)
IndexedWordgetFirstRoot()
Returns the (first) root of this SemanticGraph.
ListgetIncomingEdgesSorted(IndexedWord vertex)
IndexedWordgetNodeByIndexSafe(int index)
Same as above, but returns null if the index does not exist (instead of throwing an exception).
IndexedWordgetNodeByWordPattern(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.
IndexedWordgetParent(IndexedWord vertex)
Return the real syntactic parent of vertex.
SetgetParents(IndexedWord vertex)
ListgetPathToRoot(IndexedWord vertex)
Find the path from the given node to a root.
CollectiongetRoots()
ListgetShortestDirectedPathEdges(IndexedWord source, IndexedWord target)
ListgetShortestUndirectedPathEdges(IndexedWord source, IndexedWord target)
booleanhasChildWithReln(IndexedWord vertex, GrammaticalRelation reln)
Does the given vertex have at least one child with the given reln ?
intinDegree(IndexedWord vertex)
ListoutgoingEdgeList(IndexedWord v)
intsize()
Returns the number of nodes in the graph
StringtoCompactString()
StringtoList()
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) 
StringtoString(CoreLabel.OutputFormat wordFormat)
StringtoString(OutputFormat format)
Returns a String representation of the result of this set of typed dependencies in a user-specified format.
StringtoString()
Recursive depth first traversal.
CollectiontypedDependencies()
Returns a list of TypedDependency in the graph.
SemanticGraphvalueOf(String s)
ListvertexListSorted()
This returns an ordered list of vertices (based upon their indices in the sentence).
SetvertexSet()