public class NodePattern extends SemgrexPattern
SemgrexPattern.OutputFormat
env
Constructor and Description |
---|
NodePattern(edu.stanford.nlp.semgraph.semgrex.GraphRelation r,
boolean negDesc,
java.util.Map<java.lang.String,java.lang.String> attrs,
boolean root,
boolean empty,
java.lang.String name) |
NodePattern(edu.stanford.nlp.semgraph.semgrex.GraphRelation r,
boolean negDesc,
java.util.Map<java.lang.String,java.lang.String> attrs,
boolean root,
boolean empty,
java.lang.String name,
java.util.List<Pair<java.lang.Integer,java.lang.String>> variableGroups) |
Modifier and Type | Method and Description |
---|---|
java.util.List<SemgrexPattern> |
getChildren() |
java.lang.String |
getName() |
boolean |
isNull() |
boolean |
isRoot() |
java.lang.String |
localString() |
void |
makeLink() |
SemgrexMatcher |
matcher(SemanticGraph sg,
Alignment alignment,
SemanticGraph sg_align,
boolean hyp,
IndexedWord node,
java.util.Map<java.lang.String,IndexedWord> namesToNodes,
java.util.Map<java.lang.String,java.lang.String> namesToRelations,
java.util.Map<java.lang.String,SemanticGraphEdge> namesToEdges,
edu.stanford.nlp.semgraph.semgrex.VariableStrings variableStrings,
boolean ignoreCase) |
SemgrexMatcher |
matcher(SemanticGraph sg,
IndexedWord node,
java.util.Map<java.lang.String,IndexedWord> namesToNodes,
java.util.Map<java.lang.String,java.lang.String> namesToRelations,
java.util.Map<java.lang.String,SemanticGraphEdge> namesToEdges,
edu.stanford.nlp.semgraph.semgrex.VariableStrings variableStrings,
boolean ignoreCase) |
boolean |
nodeAttrMatch(IndexedWord node,
SemanticGraph sg,
boolean ignoreCase) |
void |
setChild(SemgrexPattern n) |
java.lang.String |
toString()
The goal is to return a string which will be compiled to the same pattern
|
java.lang.String |
toString(boolean hasPrecedence) |
java.lang.String |
toString(boolean hasPrecedence,
boolean addChild) |
compile, compile, equals, hashCode, help, main, matcher, matcher, matcher, matcher, matcher, matcher, pattern, prettyPrint, prettyPrint, prettyPrint, setEnv
public NodePattern(edu.stanford.nlp.semgraph.semgrex.GraphRelation r, boolean negDesc, java.util.Map<java.lang.String,java.lang.String> attrs, boolean root, boolean empty, java.lang.String name)
public NodePattern(edu.stanford.nlp.semgraph.semgrex.GraphRelation r, boolean negDesc, java.util.Map<java.lang.String,java.lang.String> attrs, boolean root, boolean empty, java.lang.String name, java.util.List<Pair<java.lang.Integer,java.lang.String>> variableGroups)
public boolean nodeAttrMatch(IndexedWord node, SemanticGraph sg, boolean ignoreCase)
public void makeLink()
public boolean isRoot()
public boolean isNull()
public java.lang.String localString()
public java.lang.String toString()
SemgrexPattern
toString
in class SemgrexPattern
public java.lang.String toString(boolean hasPrecedence)
toString
in class SemgrexPattern
hasPrecedence
- indicates that this pattern has precedence in terms
of "order of operations", so there is no need to parenthesize the
expressionpublic java.lang.String toString(boolean hasPrecedence, boolean addChild)
public void setChild(SemgrexPattern n)
public java.util.List<SemgrexPattern> getChildren()
public java.lang.String getName()
public SemgrexMatcher matcher(SemanticGraph sg, IndexedWord node, java.util.Map<java.lang.String,IndexedWord> namesToNodes, java.util.Map<java.lang.String,java.lang.String> namesToRelations, java.util.Map<java.lang.String,SemanticGraphEdge> namesToEdges, edu.stanford.nlp.semgraph.semgrex.VariableStrings variableStrings, boolean ignoreCase)
public SemgrexMatcher matcher(SemanticGraph sg, Alignment alignment, SemanticGraph sg_align, boolean hyp, IndexedWord node, java.util.Map<java.lang.String,IndexedWord> namesToNodes, java.util.Map<java.lang.String,java.lang.String> namesToRelations, java.util.Map<java.lang.String,SemanticGraphEdge> namesToEdges, edu.stanford.nlp.semgraph.semgrex.VariableStrings variableStrings, boolean ignoreCase)