public class NodePattern extends SemgrexPattern
Constructor and Description |
---|
NodePattern(edu.stanford.nlp.semgraph.semgrex.GraphRelation r,
boolean negDesc,
Map<String,String> attrs,
boolean root,
boolean empty,
String name) |
NodePattern(edu.stanford.nlp.semgraph.semgrex.GraphRelation r,
boolean negDesc,
Map<String,String> attrs,
boolean root,
boolean empty,
String name,
List<Pair<Integer,String>> variableGroups) |
Modifier and Type | Method and Description |
---|---|
List<SemgrexPattern> |
getChildren() |
String |
getName() |
boolean |
isNull() |
boolean |
isRoot() |
String |
localString() |
void |
makeLink() |
SemgrexMatcher |
matcher(SemanticGraph sg,
Alignment alignment,
SemanticGraph sg_align,
boolean hyp,
IndexedWord node,
Map<String,IndexedWord> namesToNodes,
Map<String,String> namesToRelations,
edu.stanford.nlp.semgraph.semgrex.VariableStrings variableStrings,
boolean ignoreCase) |
SemgrexMatcher |
matcher(SemanticGraph sg,
IndexedWord node,
Map<String,IndexedWord> namesToNodes,
Map<String,String> namesToRelations,
edu.stanford.nlp.semgraph.semgrex.VariableStrings variableStrings,
boolean ignoreCase) |
boolean |
nodeAttrMatch(IndexedWord node,
SemanticGraph sg,
boolean ignoreCase) |
void |
setChild(SemgrexPattern n) |
String |
toString() |
String |
toString(boolean hasPrecedence) |
String |
toString(boolean hasPrecedence,
boolean addChild) |
compile, equals, hashCode, help, main, matcher, matcher, matcher, matcher, matcher, pattern, prettyPrint, prettyPrint, prettyPrint
public NodePattern(edu.stanford.nlp.semgraph.semgrex.GraphRelation r, boolean negDesc, Map<String,String> attrs, boolean root, boolean empty, String name)
public boolean nodeAttrMatch(IndexedWord node, SemanticGraph sg, boolean ignoreCase)
public void makeLink()
public boolean isRoot()
public boolean isNull()
public String localString()
public String toString()
toString
in class SemgrexPattern
public 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 String toString(boolean hasPrecedence, boolean addChild)
public void setChild(SemgrexPattern n)
public List<SemgrexPattern> getChildren()
public String getName()
public SemgrexMatcher matcher(SemanticGraph sg, IndexedWord node, Map<String,IndexedWord> namesToNodes, Map<String,String> namesToRelations, edu.stanford.nlp.semgraph.semgrex.VariableStrings variableStrings, boolean ignoreCase)
public SemgrexMatcher matcher(SemanticGraph sg, Alignment alignment, SemanticGraph sg_align, boolean hyp, IndexedWord node, Map<String,IndexedWord> namesToNodes, Map<String,String> namesToRelations, edu.stanford.nlp.semgraph.semgrex.VariableStrings variableStrings, boolean ignoreCase)