public class Document extends Object implements Comparable<Document>
Document class represents a single document which may be either used for processing a text or as
training input. A document consists of the raw text, the interpretations and the activations.
When the document is not needed any more, the method clearActivations must be called, since Aika only
supports a single document per thread and model.
| Modifier and Type | Class and Description |
|---|---|
class |
Document.Queue |
class |
Document.UpperBoundQueue |
class |
Document.ValueQueue |
| Constructor and Description |
|---|
Document(int id,
String content,
Model model,
int threadId) |
public static boolean APPLY_DEBUG_OUTPUT
public static boolean OPTIMIZE_DEBUG_OUTPUT
public static int CLEANUP_INTERVAL
public static int MAX_ROUND
public final int id
public long visitedCounter
public int interpretationIdCounter
public int activationIdCounter
public int searchNodeIdCounter
public int searchStepCounter
public InterpretationNode bottom
public Model model
public int threadId
public Document.Queue queue
public Document.ValueQueue vQueue
public Document.UpperBoundQueue ubQueue
public TreeSet<Activation> inputNeuronActivations
public SupervisedTraining supervisedTraining
public TreeMap<NodeActivation.Key,Activation> activationsByRid
public ArrayList<NodeActivation> addedNodeActivations
public ArrayList<Activation> addedActivations
public SearchNode rootSearchNode
public SearchNode selectedSearchNode
public List<InterpretationNode> bestInterpretation
public long createV
public static Comparator<NodeActivation> ACTIVATIONS_OUTPUT_COMPARATOR
public String getContent()
public int length()
public Stream<Activation> getFinalActivations()
public Stream<Activation> getActivations()
public String bestInterpretationToString()
public int compareTo(Document doc)
compareTo in interface Comparable<Document>public void propagate()
public void generateCandidates()
public void process()
process needs to be called after all the input activations have been added to the
network. It performs the search for the best interpretation.public void dumpDebugCandidateStatistics()
public void notifyWeightsModified(INeuron n, Collection<Synapse> inputSynapses)
public void commit()
public void clearActivations()
public String generateOutputText()
public String activationsToString()
public String activationsToString(boolean withTextSnipped, boolean withLogic)
public String activationsToString(SearchNode sn, boolean withTextSnippet, boolean withLogic)
public Stream<NodeActivation> getAllActivationsStream()
public void dumpOscillatingActivations()
Copyright © 2018. All rights reserved.