public static interface ClauseSplitterSearchProblem.Action
Modifier and Type | Method and Description |
---|---|
java.util.Optional<ClauseSplitterSearchProblem.State> |
applyTo(SemanticGraph tree,
ClauseSplitterSearchProblem.State source,
SemanticGraphEdge outgoingEdge,
SemanticGraphEdge subjectOrNull,
SemanticGraphEdge ppOrNull)
Apply this action to the given state.
|
default boolean |
prerequisitesMet(SemanticGraph originalTree,
SemanticGraphEdge edge)
A check to make sure this is actually a valid action to take, in the context of the given tree.
|
java.lang.String |
signature()
The name of this action.
|
java.lang.String signature()
default boolean prerequisitesMet(SemanticGraph originalTree, SemanticGraphEdge edge)
originalTree
- The _original_ tree we are searching over. This is before any clauses are split off.edge
- The edge that we are traversing with this clause.java.util.Optional<ClauseSplitterSearchProblem.State> applyTo(SemanticGraph tree, ClauseSplitterSearchProblem.State source, SemanticGraphEdge outgoingEdge, SemanticGraphEdge subjectOrNull, SemanticGraphEdge ppOrNull)
tree
- The original tree we are applying the action to.source
- The source state we are mutating from.outgoingEdge
- The edge we are splitting off as a clause.subjectOrNull
- The subject of the parent tree, if there is one.ppOrNull
- The preposition attachment of the parent tree, if there is one.Optional.empty()
if this action was not successful.