public class SearchNode extends Object implements Comparable<SearchNode>
SearchNode class represents a node in the binary search tree that is used to find the optimal
interpretation for a given document. Each search node possess a refinement (simply a set of interpretation nodes).
The two options that this search node examines are that the refinement will either part of the final interpretation or not.
During each search step the activation values in all the neuron activations adjusted such that they reflect the interpretation of the current search path.
When the search reaches the maximum depth of the search tree and no further refinements exists, a weight is computed evaluating the current search path.
The search path with the highest weight is used to determine the final interpretation.
Before the search is started a set of initial refinements is generated from the conflicts within the document. In other words, if there are no conflicts in a given document, then no search is needed. In this case the final interpretation will simply be the set of all interpretation nodes. The initial refinements are then expanded, meaning all interpretation nodes that are consistent with this refinement are added to the refinement. The initial refinements are then propagated along the search path as refinement candidates.
| Modifier and Type | Class and Description |
|---|---|
static class |
SearchNode.Coverage |
static class |
SearchNode.DebugState |
static class |
SearchNode.StateChange
The
StateChange class is used to store the state change of an activation that occurs in each node of
the binary search tree. |
| Modifier and Type | Field and Description |
|---|---|
SearchNode |
excludedParent |
int |
id |
static int |
MAX_SEARCH_STEPS |
List<SearchNode.StateChange> |
modifiedActs |
SearchNode |
selectedParent |
int |
visited |
| Constructor and Description |
|---|
SearchNode(Document doc,
SearchNode selParent,
SearchNode exclParent,
org.aika.corpus.SearchNode.Candidate c,
int level,
List<InterprNode> changed) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
affectsUnknown(SearchNode p) |
void |
changeState(SearchNode.StateChange.Mode m) |
static Set<InterprNode> |
collectConflicts(Document doc) |
int |
compareTo(SearchNode sn) |
void |
computeBestInterpretation(Document doc) |
boolean |
containedInSelectedBranch(InterprNode n) |
void |
dumpDebugState() |
org.aika.corpus.SearchNode.Candidate[] |
generateCandidates(Document doc) |
Boolean |
getCachedDecision() |
SearchNode.Coverage |
getCoverage(InterprNode n) |
SearchNode |
getParent() |
boolean |
isCovered(int g) |
String |
pathToString(Document doc) |
String |
toString(Document doc) |
public static int MAX_SEARCH_STEPS
public int id
public SearchNode excludedParent
public SearchNode selectedParent
public int visited
public List<SearchNode.StateChange> modifiedActs
public SearchNode(Document doc, SearchNode selParent, SearchNode exclParent, org.aika.corpus.SearchNode.Candidate c, int level, List<InterprNode> changed)
public void computeBestInterpretation(Document doc)
public void dumpDebugState()
public org.aika.corpus.SearchNode.Candidate[] generateCandidates(Document doc)
public static Set<InterprNode> collectConflicts(Document doc)
public SearchNode.Coverage getCoverage(InterprNode n)
public boolean isCovered(int g)
public boolean containedInSelectedBranch(InterprNode n)
public void changeState(SearchNode.StateChange.Mode m)
public int compareTo(SearchNode sn)
compareTo in interface Comparable<SearchNode>public SearchNode getParent()
public Boolean getCachedDecision()
public boolean affectsUnknown(SearchNode p)
Copyright © 2017. All rights reserved.