edu.stanford.nlp.semgrex
Class NodePattern
java.lang.Object
edu.stanford.nlp.semgrex.SemgrexPattern
edu.stanford.nlp.semgrex.NodePattern
- All Implemented Interfaces:
- Serializable
public class NodePattern
- extends SemgrexPattern
- See Also:
- Serialized Form
Constructor Summary |
NodePattern(edu.stanford.nlp.semgrex.GraphRelation r,
boolean negDesc,
Map<String,String> attrs,
boolean root,
boolean empty,
String name)
|
NodePattern(edu.stanford.nlp.semgrex.GraphRelation r,
boolean negDesc,
Map<String,String> attrs,
boolean root,
boolean empty,
String name,
List<Pair<Integer,String>> variableGroups)
|
Method Summary |
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.semgrex.VariableStrings variableStrings,
boolean ignoreCase)
|
SemgrexMatcher |
matcher(SemanticGraph sg,
IndexedWord node,
Map<String,IndexedWord> namesToNodes,
Map<String,String> namesToRelations,
edu.stanford.nlp.semgrex.VariableStrings variableStrings,
boolean ignoreCase)
|
boolean |
nodeAttrMatch(IndexedWord node,
SemanticGraph sg,
boolean ignoreCase)
|
void |
setChild(SemgrexPattern n)
|
String |
toString()
|
Methods inherited from class edu.stanford.nlp.semgrex.SemgrexPattern |
compile, matcher, matcher, matcher, matcher, matcher, pattern, prettyPrint, prettyPrint, prettyPrint, setPatternString |
NodePattern
public NodePattern(edu.stanford.nlp.semgrex.GraphRelation r,
boolean negDesc,
Map<String,String> attrs,
boolean root,
boolean empty,
String name)
NodePattern
public NodePattern(edu.stanford.nlp.semgrex.GraphRelation r,
boolean negDesc,
Map<String,String> attrs,
boolean root,
boolean empty,
String name,
List<Pair<Integer,String>> variableGroups)
nodeAttrMatch
public boolean nodeAttrMatch(IndexedWord node,
SemanticGraph sg,
boolean ignoreCase)
makeLink
public void makeLink()
isRoot
public boolean isRoot()
isNull
public boolean isNull()
localString
public String localString()
toString
public String toString()
- Specified by:
toString
in class SemgrexPattern
- Returns:
- A single-line string representation of the pattern
setChild
public void setChild(SemgrexPattern n)
getChildren
public List<SemgrexPattern> getChildren()
getName
public String getName()
matcher
public SemgrexMatcher matcher(SemanticGraph sg,
IndexedWord node,
Map<String,IndexedWord> namesToNodes,
Map<String,String> namesToRelations,
edu.stanford.nlp.semgrex.VariableStrings variableStrings,
boolean ignoreCase)
matcher
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.semgrex.VariableStrings variableStrings,
boolean ignoreCase)
Stanford NLP Group