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 |
|---|---|
static class |
Document.ActKey |
class |
Document.Queue |
class |
Document.UpperBoundQueue |
class |
Document.ValueQueue |
| Constructor and Description |
|---|
Document(int id,
String content,
Model model,
int threadId) |
| Modifier and Type | Method and Description |
|---|---|
String |
activationsToString() |
String |
activationsToString(boolean finalOnly,
boolean withTextSnippet,
boolean withLogic) |
void |
append(String txt) |
char |
charAt(int i) |
void |
clearActivations()
Removes the activations of this document from the model again.
|
void |
commit()
Updates the model after the training step.
|
int |
compareTo(Document doc) |
void |
dumpDebugCandidateStatistics() |
void |
dumpOscillatingActivations() |
void |
generateCandidates() |
String |
generateOutputText() |
Collection<Activation> |
getActivations(boolean onlyFinal) |
Stream<NodeActivation> |
getAllActivationsStream() |
String |
getContent() |
String |
getText(Range r) |
int |
length() |
void |
notifyWeightModified(Synapse synapse) |
void |
process()
The method
process needs to be called after all the input activations have been added to the
network. |
void |
process(Long timeoutInMilliSeconds) |
void |
propagate() |
String |
toString() |
public static int CLEANUP_INTERVAL
public static int MAX_ROUND
public static boolean INCREMENTAL_MODE
public final int id
public long visitedCounter
public int activationIdCounter
public int searchNodeIdCounter
public int searchStepCounter
public Model model
public int threadId
public Document.Queue queue
public Document.ValueQueue vQueue
public Document.UpperBoundQueue ubQueue
public Linker linker
public TreeSet<Activation> inputNeuronActivations
public SupervisedTraining supervisedTraining
public TreeMap<Document.ActKey,Activation> activationsByRangeBegin
public TreeMap<Document.ActKey,Activation> activationsByRangeEnd
public ArrayList<NodeActivation> addedNodeActivations
public ArrayList<Activation> addedActivations
public SearchNode selectedSearchNode
public long createV
public static Comparator<Activation> ACTIVATIONS_OUTPUT_COMPARATOR
public void append(String txt)
public char charAt(int i)
public String getContent()
public int length()
public Collection<Activation> getActivations(boolean onlyFinal)
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 process(Long timeoutInMilliSeconds) throws SearchNode.TimeoutException
SearchNode.TimeoutExceptionpublic void dumpDebugCandidateStatistics()
public void notifyWeightModified(Synapse synapse)
public void commit()
public void clearActivations()
public String generateOutputText()
public String activationsToString()
public String activationsToString(boolean finalOnly, boolean withTextSnippet, boolean withLogic)
public Stream<NodeActivation> getAllActivationsStream()
public void dumpOscillatingActivations()
Copyright © 2018. All rights reserved.