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.BackPropagationQueue |
class |
Document.Queue |
class |
Document.UpperBoundQueue |
class |
Document.ValueQueue |
| Modifier and Type | Field and Description |
|---|---|
TreeSet<INeuron> |
activatedNeurons |
TreeSet<Node> |
activatedNodes |
TreeSet<Node> |
activatedNodesForTraining |
int |
activationIdCounter |
static Comparator<NodeActivation> |
ACTIVATIONS_OUTPUT_COMPARATOR |
TreeMap<NodeActivation.Key,NodeActivation> |
activationsByRid |
TreeSet<Node> |
addedNodes |
static boolean |
APPLY_DEBUG_OUTPUT |
List<InterprNode> |
bestInterpretation |
InterprNode |
bottom |
Document.BackPropagationQueue |
bQueue |
static int |
CLEANUP_INTERVAL |
int |
debugActId |
double |
debugActWeight |
String |
debugOutput |
static AtomicInteger |
docIdCounter |
TreeSet<INeuron> |
finallyActivatedNeurons |
int |
id |
TreeSet<Activation> |
inputNeuronActivations |
int |
interprIdCounter |
boolean |
interrupted |
Model |
m |
static int |
MAX_ROUND |
static int |
numberOfPositionsDelta |
static boolean |
OPTIMIZE_DEBUG_OUTPUT |
Document.Queue |
queue |
int |
searchNodeIdCounter |
SearchNode |
selectedSearchNode |
int |
threadId |
Document.UpperBoundQueue |
ubQueue |
int |
visitedCounter |
Document.ValueQueue |
vQueue |
| Constructor and Description |
|---|
Document(String content,
Model m,
int threadId) |
| Modifier and Type | Method and Description |
|---|---|
String |
bestInterpretationToString() |
void |
changeNumberOfPositions(int delta) |
void |
clearActivations()
Removes the activations of this document from the model again.
|
int |
compareTo(Document doc) |
void |
count() |
String |
getContent() |
String |
getText(Range r) |
int |
length() |
String |
neuronActivationsToString(boolean withWeights) |
String |
neuronActivationsToString(boolean withWeights,
boolean withTextSnipped,
boolean withLogic) |
String |
nodeActivationsToString(boolean withTextSnipped,
boolean withLogic) |
void |
process()
The method
process needs to be called after all the input activations have been added to the
network. |
void |
propagate() |
String |
toString() |
void |
train(TrainConfig trainConfig) |
public final int id
public static AtomicInteger docIdCounter
public int activationIdCounter
public static boolean APPLY_DEBUG_OUTPUT
public static boolean OPTIMIZE_DEBUG_OUTPUT
public static int CLEANUP_INTERVAL
public static int MAX_ROUND
public int visitedCounter
public int interprIdCounter
public int searchNodeIdCounter
public InterprNode bottom
public SearchNode selectedSearchNode
public List<InterprNode> bestInterpretation
public Model m
public int threadId
public boolean interrupted
public Document.Queue queue
public Document.ValueQueue vQueue
public Document.UpperBoundQueue ubQueue
public Document.BackPropagationQueue bQueue
public TreeSet<Activation> inputNeuronActivations
public TreeMap<NodeActivation.Key,NodeActivation> activationsByRid
public static int numberOfPositionsDelta
public int debugActId
public double debugActWeight
public String debugOutput
public static Comparator<NodeActivation> ACTIVATIONS_OUTPUT_COMPARATOR
public String getContent()
public int length()
public String bestInterpretationToString()
public int compareTo(Document doc)
compareTo in interface Comparable<Document>public void propagate()
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 count()
public void train(TrainConfig trainConfig)
public void clearActivations()
public void changeNumberOfPositions(int delta)
public String neuronActivationsToString(boolean withWeights)
public String neuronActivationsToString(boolean withWeights, boolean withTextSnipped, boolean withLogic)
public String nodeActivationsToString(boolean withTextSnipped, boolean withLogic)
Copyright © 2017. All rights reserved.