public class Comprehension extends SubconsciousThought
Modifier and Type | Class and Description |
---|---|
static class |
Comprehension.PathType
Define the traversal path types for the language state machine.
|
Modifier and Type | Field and Description |
---|---|
static int |
MAX_IDENTIFIER |
delay, threshold
Constructor and Description |
---|
Comprehension() |
Modifier and Type | Method and Description |
---|---|
void |
addSentencePreviousMeta(Relationship relationship,
Vertex questionInput,
Vertex previousQuestionInput,
java.util.Map<Vertex,Vertex> variables,
Network network)
Add the sentence from the previous input to the relationships response meta info.
|
void |
awake()
Add a listener to the memory to be notified when new active memory.
|
boolean |
checkQuotient(Vertex currentState,
Vertex sentence,
Vertex questionInput,
Vertex responseInput,
Comprehension.PathType path,
java.util.Map<Vertex,Vertex> variables,
Network network)
Check if any of the existing quotients match, if none do, then add a new quotient.
|
Relationship |
checkTemplate(Vertex input,
Network network)
Check if the response can be defined as a template based on the question, context.
|
Vertex |
createTemplate(Vertex questionInput,
Vertex responseInput,
java.util.Map<Vertex,Vertex> variables,
Network network)
Attempt to create a template response from the question and response.
|
boolean |
isConsciousProcessingRequired()
The input must be processed by language first to associate the question/response.
|
void |
migrateProperties()
Migrate to new properties system.
|
boolean |
processInput(Vertex input,
Network network)
If the input is a sentence process it for language rules and variable substitution.
|
boolean |
processState(Vertex currentState,
java.util.List<Vertex> words,
int index,
java.lang.String statePath,
Comprehension.PathType path,
Vertex sentence,
Vertex questionInput,
Vertex responseInput,
java.util.Map<Vertex,Vertex> variables,
Network network)
Check if any of the current states match the next word,
if no match, or quotient does not match, add a new case.
|
void |
saveProperties() |
getActiveMemoryBackLog, isConscious, setActiveMemoryBackLog, stop, think
getBot, getName, getPrimitive, getShortTermMemory, initialize, isCritical, isEnabled, isStopped, log, log, pool, setBot, setEnabled, setName, setStopped, toString
public void awake()
SubconsciousThought
awake
in interface Thought
awake
in class SubconsciousThought
public void migrateProperties()
migrateProperties
in interface Thought
migrateProperties
in class BasicThought
public void saveProperties()
saveProperties
in interface Thought
saveProperties
in class BasicThought
public boolean isConsciousProcessingRequired()
isConsciousProcessingRequired
in class SubconsciousThought
public boolean processInput(Vertex input, Network network)
processInput
in class SubconsciousThought
public Relationship checkTemplate(Vertex input, Network network)
public boolean processState(Vertex currentState, java.util.List<Vertex> words, int index, java.lang.String statePath, Comprehension.PathType path, Vertex sentence, Vertex questionInput, Vertex responseInput, java.util.Map<Vertex,Vertex> variables, Network network)
public void addSentencePreviousMeta(Relationship relationship, Vertex questionInput, Vertex previousQuestionInput, java.util.Map<Vertex,Vertex> variables, Network network)
public boolean checkQuotient(Vertex currentState, Vertex sentence, Vertex questionInput, Vertex responseInput, Comprehension.PathType path, java.util.Map<Vertex,Vertex> variables, Network network)