|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.semgrex.SemgrexMatcher
public abstract class SemgrexMatcher
A SemgrexMatcher
can be used to match a SemgrexPattern
against a SemanticGraph
.
Matcher
.
Method Summary | |
---|---|
boolean |
find()
Find the next match of the pattern in the graph |
boolean |
findNextMatchingNode()
Find the next match of the pattern in the graph such that the matching node (that is, the node matching the root node of the pattern) differs from the previous matching node. |
SemanticGraph |
getGraph()
Returns the graph associated with this match. |
abstract IndexedWord |
getMatch()
Get the last matching node -- that is, the node that matches the root node of the pattern. |
IndexedWord |
getNode(java.lang.String name)
Returns the node labeled with name in the pattern. |
java.util.Set<java.lang.String> |
getNodeNames()
Returns the set of names for named nodes in this pattern. |
java.util.Set<java.lang.String> |
getRelationNames()
Returns the set of names for named relations in this pattern. |
java.lang.String |
getRelnString(java.lang.String name)
|
abstract boolean |
matches()
Does the pattern match the graph? It's actually closer to java.util.regex's "lookingAt" in that the root of the graph has to match the root of the pattern but the whole tree does not have to be "accounted for". |
boolean |
matchesAt(IndexedWord node)
Rests the matcher and tests if it matches in the graph when rooted at node . |
void |
reset()
Resets the matcher so that its search starts over. |
abstract java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void reset()
public abstract boolean matches()
public boolean matchesAt(IndexedWord node)
node
.
public abstract IndexedWord getMatch()
public boolean find()
public boolean findNextMatchingNode()
public IndexedWord getNode(java.lang.String name)
name
in the pattern.
name
- the name of the node, specified in the pattern.
public java.lang.String getRelnString(java.lang.String name)
public java.util.Set<java.lang.String> getNodeNames()
public java.util.Set<java.lang.String> getRelationNames()
public abstract java.lang.String toString()
toString
in class java.lang.Object
public SemanticGraph getGraph()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |