public class Language extends BasicThought
Modifier and Type | Class and Description |
---|---|
static class |
Language.CorrectionMode
Defines who the bot will allow corrections from.
|
static class |
Language.LanguageState
Defines the various language conversational states.
|
static class |
Language.LearningMode
Defines who the bot will learn from.
|
Modifier and Type | Field and Description |
---|---|
int |
confidence |
static float |
CONVERSATION_MATCH_PERCENTAGE |
static int |
COVERSATIONAL_RESPONSE_DELAY |
int |
defaultResponses |
static float |
DISCUSSION_MATCH_PERCENTAGE |
static int |
MAX_DEPTH |
static int |
MAX_FILE_SIZE |
static int |
MAX_PROCCESS_TIME |
static int |
MAX_RESPONSE_PROCESS |
static int |
MAX_STACK |
static int |
MAX_STATE_PROCESS |
static boolean |
PROCESS_HTTP |
float |
sentiment |
Constructor and Description |
---|
Language()
Create a new thought.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
addCorrection(Vertex originalQuestionInput,
Vertex originalQuestion,
Vertex wrongResponseInput,
Vertex correction,
Vertex previousQuestionInput,
Network network)
Add the sentence from the previous input to the relationships response meta info.
|
void |
addQuestionMatches(Vertex sentence,
Network network,
long startTime,
long processTime,
java.util.List<Relationship> wordRelations,
java.util.Map<Vertex,java.lang.Integer> matches,
java.util.Map<Vertex,java.util.Set<Vertex>> processed,
Primitive key,
boolean keywords)
Add all of the questions for all of the words to the matching map.
|
static void |
addResponse(Vertex question,
Vertex answer,
Network network)
Add the new response.
|
static void |
addResponse(Vertex question,
Vertex answer,
java.lang.String topic,
java.lang.String keywords,
java.lang.String required,
float correctness,
Network network)
Add the new response.
|
static void |
addResponse(Vertex question,
Vertex answer,
java.lang.String topic,
java.lang.String keywords,
java.lang.String required,
Network network)
Add the new response.
|
static void |
addSentenceActionMeta(Vertex question,
Vertex answer,
java.lang.String actions,
Network network)
Add the actions to the response.
|
static void |
addSentenceCommandMeta(Vertex question,
Vertex answer,
java.lang.String command,
boolean pin,
Network network)
Add the command as the command for a response match to the question meta.
|
static void |
addSentenceConditionMeta(Vertex question,
Vertex answer,
java.lang.String condition,
boolean pin,
Network network)
Add the script as the condition for a response match to the question meta.
|
static void |
addSentenceEmotesMeta(Vertex question,
Vertex answer,
java.lang.String emotes,
Network network)
Add the emotes to the response.
|
static void |
addSentenceKeyWordsMeta(Vertex question,
Vertex answer,
java.lang.String keywords,
Network network)
Add the keywords as required keywords for a response match to the question meta.
|
static void |
addSentencePoseMeta(Vertex question,
Vertex answer,
java.lang.String poses,
Network network)
Add the actions to the response.
|
static void |
addSentencePreviousMeta(Relationship relationship,
Vertex previousQuestionInput,
Network network)
Add the sentence from the previous input to the relationships response meta info.
|
static void |
addSentencePreviousMeta(Vertex question,
Vertex answer,
Vertex previous,
boolean require,
Network network)
Add the previous for a response match to the question meta.
|
static void |
addSentenceRequiredMeta(Vertex question,
Vertex answer,
java.lang.String required,
Network network)
Add the keywords as required keywords for a response match to the question meta.
|
static void |
addSentenceThinkMeta(Vertex question,
Vertex answer,
java.lang.String think,
boolean pin,
Network network)
Add the script as the think for a response match to the question meta.
|
static void |
addSentenceTopicMeta(Vertex question,
Vertex answer,
java.lang.String topic,
Network network)
Add the topic as a desired topic for a response match to the question meta.
|
static void |
addToConversation(Vertex input,
Vertex conversation)
Add the input to the conversation.
|
Vertex |
allowCorrection(Vertex source,
Vertex user)
Self API for checking is a user is trusted and should allow correction.
|
void |
awake()
Perform any initialization required on startup.
|
Vertex[] |
bestAnswer(float percentage,
Vertex state,
java.util.Map<Vertex,Vertex> localVariables,
Vertex input,
Vertex sentence,
Network network)
Return the best response to the question, taking into account the input history.
|
Relationship |
bestResponse(float percentage,
Vertex input,
Vertex sentence,
Vertex question,
Vertex previousResponse,
boolean cascade,
boolean init,
Vertex previousQuestion,
java.util.Set<java.lang.String> questionWords,
Vertex currentTopic,
java.util.Map<Vertex,Vertex> variables,
Network network)
Return the best response to the question, taking into account the input history.
|
Relationship |
bestResponse(float percentage,
Vertex input,
Vertex sentence,
Vertex question,
Vertex previousResponse,
java.util.Map<Vertex,Vertex> variables,
Network network)
Return the best response to the question, taking into account the input history.
|
static Vertex |
buildStar(java.util.List<Vertex> star,
java.util.Map<Vertex,Vertex> variables,
Network network) |
void |
checkBetterMatch(java.util.Map.Entry<Vertex,java.lang.Integer> entry,
java.util.Map<Vertex,java.lang.Integer> keyWordsMatches,
java.lang.Object[] best,
int tooBig,
int tooSmall,
int wordCount,
float percentage,
Vertex input,
Vertex sentence,
Vertex question,
Vertex previousResponse,
boolean cascade,
boolean init,
Vertex previousQuestion,
java.util.Set<java.lang.String> questionWords,
Vertex currentTopic,
java.util.Map<Vertex,Vertex> variables,
Network network) |
java.lang.Boolean |
checkCondition(Relationship relationship,
java.util.Map<Vertex,Vertex> variables,
Network network)
Check if the response has a condition, and if it evaluates to true.
|
Vertex |
checkDefaultResponseFormula(Vertex response,
Vertex input,
Network network,
java.util.Map<Vertex,Vertex> variables) |
Vertex |
checkDuplicateOrOffensiveResponse(Vertex response,
Vertex sentence,
Vertex conversation,
Vertex input,
java.util.Map<Vertex,Vertex> variables,
Network network,
boolean allowMatch,
boolean checkUnderstanding)
Check if the previous response was the same and try to find a new one.
|
Vertex |
checkOnRepeat(Vertex response,
Vertex conversation,
int depth)
Check if the response has already been used, and if it has an ONREPEAT response.
|
void |
checkQuestion(Vertex sentence,
Network network)
Mark the sentence as a question.
|
Vertex |
checkState(Vertex root,
Vertex input,
Vertex sentence,
java.util.List<Vertex> states,
int index,
int recurse,
java.util.List<Vertex> inputs,
java.util.Map<Vertex,Vertex> variables,
java.util.List<Vertex> stateStack,
float correctnessRequired,
Network network)
Apply each state machine vertex to the sentence of words.
|
static void |
clearSentenceMeta(Vertex question,
Vertex answer,
Primitive type,
Network network)
Clear any relations in the meta of the type.
|
java.util.Map<Primitive,java.lang.Object> |
clearVoiceProperties() |
int |
computeMaxSentenceValue(Vertex match,
Vertex original,
Network network)
Compute the real value of the sentence.
|
int |
computeWordValue(Vertex word)
Return the matching value for the word, some word types are worth more than others.
|
Vertex |
createSentenceText(Vertex vertex,
Network network)
Create the text for the sentence.
|
Vertex |
define(Vertex source,
Vertex word,
Vertex meaning)
Self API to define a word.
|
Vertex |
details(Vertex source,
Vertex object)
Self API to print the details of an object.
|
Vertex |
evaluateAnswerResponse(Vertex answer,
Vertex state,
java.util.Map<Vertex,Vertex> localVariables,
Network network)
Evaluate the quotient and possible formula response.
|
Vertex |
evaluateFormula(Vertex formula,
java.util.Map<Vertex,Vertex> variables,
Network network)
Evaluate the sentence formula/template in the context of the input.
|
Vertex |
evaluateFormulaTemplate(Vertex formula,
java.util.Map<Vertex,Vertex> variables,
long startTime,
Network network)
Evaluate the sentence formula/template in the context of the input.
|
static boolean |
evaluatePattern(Vertex pattern,
Vertex sentence,
Primitive variable,
java.util.Map<Vertex,Vertex> variables,
Network network)
Determine if the pattern matches the sentence.
|
static boolean |
evaluatePattern(Vertex pattern,
Vertex sentence,
Primitive variable,
java.util.Map<Vertex,Vertex> variables,
Network network,
java.util.List<Vertex> elements,
java.util.List<Vertex> words,
int wildcardSkip)
Determine if the pattern matches the sentence.
|
Relationship |
findResponseMatch(Vertex sentence,
Vertex previousResponse,
Vertex input,
java.util.Map<Vertex,Vertex> variables,
Network network,
float percentage)
Find the best match for the sentence.
|
java.lang.Boolean |
getAllowLearning() |
boolean |
getCheckExactMatchFirst() |
float |
getConversationMatchPercentage() |
Language.CorrectionMode |
getCorrectionMode() |
Vertex |
getDefaultResponse(java.util.List<Relationship> defaultResponses,
Vertex input,
Vertex sentence,
Vertex conversation,
java.util.Map<Vertex,Vertex> variables,
Network network)
Return a random default response for the topic or context.
|
float |
getDiscussionMatchPercentage() |
boolean |
getEnableEmote() |
boolean |
getEnableResponseMatch() |
boolean |
getFixFormulaCase() |
java.lang.String |
getLanguage() |
Vertex |
getLastInput(Vertex source,
Vertex conversation,
Vertex speaker)
Self API to access last input of a speaker.
|
Vertex |
getLastInput(Vertex source,
Vertex conversation,
Vertex speaker,
Vertex index)
Self API to access last input of a speaker.
|
Vertex |
getLastInput(Vertex source,
Vertex conversation,
Vertex speaker,
Vertex index,
Vertex part)
Self API to access last input of a speaker.
|
Vertex |
getLastInputInConversation(Vertex conversation,
Vertex speaker,
int last)
Return the last thing the speaker said in the conversation.
|
Vertex |
getLastQuotient(Network network) |
Vertex |
getLastState(Network network) |
Vertex |
getLastStateMachine(Network network) |
boolean |
getLearnGrammar() |
Language.LearningMode |
getLearningMode() |
float |
getLearningRate() |
int |
getMaxResponseMatchProcess() |
int |
getMaxStateProcess() |
boolean |
getReduceQuestions() |
boolean |
getSplitParagraphs() |
boolean |
getSynthesizeResponse() |
Vertex |
getWord(Vertex vertex,
Network network)
Return the sentence or word for the vertex.
|
static Vertex |
getWordFollowing(Vertex vertex,
Relationship relationship,
Vertex previousWord,
Vertex nextWord,
Network network)
Return the sentence or word for the vertex.
|
static Vertex |
getWordFollowing(Vertex vertex,
Vertex previousWord,
Vertex nextWord,
Network network)
Return the sentence or word for the vertex.
|
boolean |
hasPrevious(Vertex meta,
Vertex sentence,
Vertex state,
java.util.Map<Vertex,Vertex> localVariables,
Network network)
Return the best response to the question, taking into account the input history.
|
java.util.List<Vertex> |
importHTML(java.lang.String url,
java.lang.String xpath,
java.lang.String learningMode,
Network network)
Attempt to import and learn new responses from a website.
|
Vertex |
input(Vertex input,
Vertex sentence,
java.util.Map<Vertex,Vertex> variables,
Network network)
Process the input and return the response.
|
static Vertex |
invertWordCase(Vertex word,
Network network) |
static boolean |
isPunctuation(Vertex word) |
Vertex |
keywordIndexes(Vertex source,
Vertex text,
Vertex keywords)
Self API to return an array of word indexes.
|
Vertex |
learn(Vertex source,
Vertex question,
Vertex response)
Self API for learning a new response.
|
Vertex |
learn(Vertex source,
Vertex question,
Vertex response,
Vertex topic)
Self API for learning a new response.
|
void |
loadAIML(java.lang.String text,
java.lang.String name,
boolean createStates,
boolean mergeState,
boolean indexStatic)
Load, parse, the aiml file as a state machine.
|
void |
loadAIMLAsLog(java.lang.String text,
boolean pin)
Load, parse, the aiml as a chat log.
|
void |
loadAIMLFile(java.io.File file,
boolean createStates,
boolean indexStatic,
java.lang.String encoding)
Load, parse, the aiml file as a script.
|
void |
loadAIMLFile(java.io.InputStream stream,
java.lang.String name,
boolean createStates,
boolean mergeState,
boolean indexStatic,
java.lang.String encoding,
int maxSize)
Load, parse, the aiml file as a state machine.
|
void |
loadAIMLFileAsLog(java.io.File file,
java.lang.String encoding,
boolean pin)
Load, parse, the aiml file as a chat log.
|
void |
loadAIMLFileAsLog(java.io.InputStream stream,
java.lang.String encoding,
int maxSize,
boolean pin)
Load, parse, the aiml file as a chat log.
|
void |
loadSelf(java.lang.String text,
boolean debug,
boolean optimize)
Load, compile, and add the state machine from the Self source code.
|
void |
loadSelfFile(java.io.File file,
java.lang.String encoding,
boolean debug)
Load, compile, and add the state machine from the .self file.
|
void |
loadSelfFile(java.io.InputStream stream,
java.lang.String encoding,
int maxSize,
boolean debug,
boolean optimize)
Load, compile, and add the state machine from the .self file stream.
|
void |
loadSelfFile(java.net.URL url,
java.lang.String encoding,
boolean debug)
Load, compile, and add the state machine from the .self file.
|
Relationship |
matchPattern(Vertex sentence,
Vertex previousResponse,
Vertex input,
java.util.Map<Vertex,Vertex> variables,
Network network,
float percentage)
Find the best pattern that matches the sentence.
|
void |
migrateProperties()
Migrate to new properties system.
|
Vertex |
paragraph(Vertex source,
Vertex text)
Self API to create a paragraph.
|
void |
pool()
Reset state when instance is pooled.
|
static java.lang.String |
printFragment(Vertex fragment,
Vertex previousWord,
Vertex nextWord,
Network network) |
Vertex |
processAssociation(Vertex text,
Network network)
Associate the word to the current context selection.
|
java.util.List<Vertex> |
processCompoundWords(java.util.List<Relationship> words)
Transform the list of words, into a list of compound words.
|
Vertex |
processConversational(Vertex input,
Vertex sentence,
Vertex conversation,
java.util.Map<Vertex,Vertex> variables,
Network network,
Language.LanguageState state)
Process the conversational sentence.
|
Vertex |
processCorrection(Vertex input,
Vertex correction,
Vertex speaker,
Vertex target,
Vertex conversation,
Network network)
Process the correction to the last question.
|
Vertex |
processDiscussion(Vertex input,
Vertex sentence,
Vertex conversation,
java.util.Map<Vertex,Vertex> variables,
Network network)
Process the discussion sentence.
|
Vertex |
processGreeting(Vertex input,
Vertex conversation,
Network network,
Language.LanguageState state,
java.util.Map<Vertex,Vertex> variables)
Process the start of a new conversation and output the greeting.
|
void |
processHttp(Vertex sentence,
Network network)
Lookup any urls in the text.
|
Vertex |
processListening(Vertex input,
Vertex sentence,
Vertex speaker,
Vertex conversation,
java.util.List<Relationship> targets,
Network network,
Language.LanguageState state)
Associate the response, attempt to understand.
|
void |
processOffensive(Vertex input,
Vertex speaker,
Vertex target,
Vertex conversation,
Network network)
Process a offensive response.
|
Vertex |
processUnderstanding(Vertex input,
Vertex sentence,
float correctnessRequired,
java.util.Map<Vertex,Vertex> variables,
Network network)
Attempt to understand the sentence using state machines.
|
Vertex |
randomSynthesize(Vertex source)
Self API for synthesizing a new response.
|
Vertex |
randomSynthesize(Vertex source,
Vertex phrase)
Self API for synthesizing a new response from a phrase.
|
void |
recordPatternValues(Vertex word,
Vertex sentence,
java.util.Map<Vertex,java.lang.Integer> matches,
Network network,
java.util.List<Vertex> defer)
Add all of the patterns for the word with its value.
|
void |
recordSetenceValues(Vertex word,
Vertex originalWord,
java.util.Collection<Relationship> relationships,
int value,
Vertex sentence,
java.util.Map<Vertex,java.lang.Integer> matches,
java.util.Map<Vertex,java.util.Set<Vertex>> processed,
Network network,
java.util.List<Vertex> defer)
Add all of the sentences for the word with its value.
|
static void |
recordStar(java.util.List<java.util.List<Vertex>> star,
Primitive variable,
java.util.Map<Vertex,Vertex> variables,
Network network) |
static void |
removeSentencePreviousMeta(Relationship relationship,
Vertex previousQuestionInput,
Network network)
Remove the sentence from the previous input to the relationships response meta info.
|
void |
saveProperties() |
Vertex |
sentence(Vertex source,
Vertex[] arguments)
Self API to create a sentence.
|
void |
setAllowLearning(java.lang.Boolean allowLearning) |
void |
setCheckExactMatchFirst(boolean checkExactMatchFirst) |
void |
setConversationMatchPercentage(float conversationMatchPercentage) |
void |
setCorrectionMode(Language.CorrectionMode correctionMode) |
void |
setDiscussionMatchPercentage(float discussionMatchPercentage) |
void |
setEnableEmote(boolean enableEmote) |
void |
setEnableResponseMatch(boolean enableResponseMatch) |
void |
setFixFormulaCase(boolean fixFormulaCase) |
void |
setLanguage(java.lang.String language) |
void |
setLastQuotient(Vertex lastQuotient) |
void |
setLastState(Vertex lastState) |
void |
setLastStateMachine(Vertex lastStateMachine) |
void |
setLearnGrammar(boolean learnGrammar) |
void |
setLearningMode(Language.LearningMode learningMode) |
void |
setLearningRate(float learningRate) |
void |
setMaxResponseMatchProcess(int maxResponseMatchProcess) |
void |
setMaxStateProcess(int maxStateProcess) |
void |
setReduceQuestions(boolean reduceQuestions) |
void |
setSplitParagraphs(boolean splitParagraphs) |
void |
setSynthesizeResponse(boolean synthesizeResponse) |
boolean |
shouldCorrect(Vertex input,
Vertex speaker)
Return if learning should be used for the input.
|
boolean |
shouldLearn(Vertex input,
Vertex speaker)
Return if learning should be used for the input.
|
void |
stop()
Stop analysing network.
|
Vertex |
synthesize(Vertex source)
Self API for synthesizing a new response.
|
Vertex |
synthesize(Vertex source,
Vertex phrase)
Self API for synthesizing a new response from a phrase.
|
Vertex |
synthesizeResponse(Vertex input,
Vertex sentence,
Vertex conversation,
boolean random,
java.util.Map<Vertex,Vertex> variables,
Network network)
Return a synthesized response from linguistic patterns.
|
void |
think()
Analyse the active memory for language.
|
Vertex |
word(Vertex source,
Vertex[] arguments)
Self API to create a compound word.
|
getBot, getName, getPrimitive, getShortTermMemory, initialize, isConscious, isCritical, isEnabled, isStopped, log, log, setBot, setEnabled, setName, setStopped, toString
public static float CONVERSATION_MATCH_PERCENTAGE
public static float DISCUSSION_MATCH_PERCENTAGE
public static int COVERSATIONAL_RESPONSE_DELAY
public static int MAX_PROCCESS_TIME
public static int MAX_STATE_PROCESS
public static int MAX_RESPONSE_PROCESS
public static int MAX_FILE_SIZE
public static int MAX_DEPTH
public static int MAX_STACK
public static boolean PROCESS_HTTP
public int defaultResponses
public int confidence
public float sentiment
public static void addToConversation(Vertex input, Vertex conversation)
public static void addSentencePreviousMeta(Relationship relationship, Vertex previousQuestionInput, Network network)
public static void addSentenceKeyWordsMeta(Vertex question, Vertex answer, java.lang.String keywords, Network network)
public static void addSentenceEmotesMeta(Vertex question, Vertex answer, java.lang.String emotes, Network network)
public static void addSentenceActionMeta(Vertex question, Vertex answer, java.lang.String actions, Network network)
public static void addSentencePoseMeta(Vertex question, Vertex answer, java.lang.String poses, Network network)
public static void addSentencePreviousMeta(Vertex question, Vertex answer, Vertex previous, boolean require, Network network)
public static void addSentenceRequiredMeta(Vertex question, Vertex answer, java.lang.String required, Network network)
public static void addSentenceTopicMeta(Vertex question, Vertex answer, java.lang.String topic, Network network)
public static void addResponse(Vertex question, Vertex answer, Network network)
public static void addResponse(Vertex question, Vertex answer, java.lang.String topic, java.lang.String keywords, java.lang.String required, Network network)
public static void addResponse(Vertex question, Vertex answer, java.lang.String topic, java.lang.String keywords, java.lang.String required, float correctness, Network network)
public static void addSentenceCommandMeta(Vertex question, Vertex answer, java.lang.String command, boolean pin, Network network)
public static void addSentenceThinkMeta(Vertex question, Vertex answer, java.lang.String think, boolean pin, Network network)
public static void addSentenceConditionMeta(Vertex question, Vertex answer, java.lang.String condition, boolean pin, Network network)
public static void clearSentenceMeta(Vertex question, Vertex answer, Primitive type, Network network)
public static boolean addCorrection(Vertex originalQuestionInput, Vertex originalQuestion, Vertex wrongResponseInput, Vertex correction, Vertex previousQuestionInput, Network network)
public static void removeSentencePreviousMeta(Relationship relationship, Vertex previousQuestionInput, Network network)
public void awake()
BasicThought
awake
in interface Thought
awake
in class BasicThought
public void migrateProperties()
migrateProperties
in interface Thought
migrateProperties
in class BasicThought
public Language.CorrectionMode getCorrectionMode()
public void setCorrectionMode(Language.CorrectionMode correctionMode)
public Language.LearningMode getLearningMode()
public void setLearningMode(Language.LearningMode learningMode)
public boolean getEnableResponseMatch()
public void setEnableResponseMatch(boolean enableResponseMatch)
public boolean getCheckExactMatchFirst()
public void setCheckExactMatchFirst(boolean checkExactMatchFirst)
public float getConversationMatchPercentage()
public void setConversationMatchPercentage(float conversationMatchPercentage)
public boolean getSynthesizeResponse()
public void setSynthesizeResponse(boolean synthesizeResponse)
public float getLearningRate()
public void setLearningRate(float learningRate)
public float getDiscussionMatchPercentage()
public void setDiscussionMatchPercentage(float discussionMatchPercentage)
public int getMaxStateProcess()
public void setMaxStateProcess(int maxStateProcess)
public int getMaxResponseMatchProcess()
public void setMaxResponseMatchProcess(int maxResponseMatchProcess)
public boolean getReduceQuestions()
public void setReduceQuestions(boolean reduceQuestions)
public boolean getFixFormulaCase()
public void setFixFormulaCase(boolean fixFormulaCase)
public boolean getLearnGrammar()
public void setLearnGrammar(boolean learnGrammar)
public void saveProperties()
saveProperties
in interface Thought
saveProperties
in class BasicThought
public java.util.Map<Primitive,java.lang.Object> clearVoiceProperties()
public void stop()
stop
in interface Thought
stop
in class BasicThought
public void pool()
pool
in interface Thought
pool
in class BasicThought
public java.lang.Boolean getAllowLearning()
public void setAllowLearning(java.lang.Boolean allowLearning)
public boolean getSplitParagraphs()
public void setSplitParagraphs(boolean splitParagraphs)
public void think()
think
in interface Thought
think
in class BasicThought
public Vertex input(Vertex input, Vertex sentence, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex evaluateFormula(Vertex formula, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex evaluateFormulaTemplate(Vertex formula, java.util.Map<Vertex,Vertex> variables, long startTime, Network network)
public static boolean evaluatePattern(Vertex pattern, Vertex sentence, Primitive variable, java.util.Map<Vertex,Vertex> variables, Network network)
public static boolean isPunctuation(Vertex word)
public static boolean evaluatePattern(Vertex pattern, Vertex sentence, Primitive variable, java.util.Map<Vertex,Vertex> variables, Network network, java.util.List<Vertex> elements, java.util.List<Vertex> words, int wildcardSkip)
public static void recordStar(java.util.List<java.util.List<Vertex>> star, Primitive variable, java.util.Map<Vertex,Vertex> variables, Network network)
public static Vertex buildStar(java.util.List<Vertex> star, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex processAssociation(Vertex text, Network network)
public void checkQuestion(Vertex sentence, Network network)
public Vertex processCorrection(Vertex input, Vertex correction, Vertex speaker, Vertex target, Vertex conversation, Network network)
public void processOffensive(Vertex input, Vertex speaker, Vertex target, Vertex conversation, Network network)
public Vertex processDiscussion(Vertex input, Vertex sentence, Vertex conversation, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex checkOnRepeat(Vertex response, Vertex conversation, int depth)
public Vertex checkDuplicateOrOffensiveResponse(Vertex response, Vertex sentence, Vertex conversation, Vertex input, java.util.Map<Vertex,Vertex> variables, Network network, boolean allowMatch, boolean checkUnderstanding)
public Relationship bestResponse(float percentage, Vertex input, Vertex sentence, Vertex question, Vertex previousResponse, java.util.Map<Vertex,Vertex> variables, Network network)
public Relationship bestResponse(float percentage, Vertex input, Vertex sentence, Vertex question, Vertex previousResponse, boolean cascade, boolean init, Vertex previousQuestion, java.util.Set<java.lang.String> questionWords, Vertex currentTopic, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex processGreeting(Vertex input, Vertex conversation, Network network, Language.LanguageState state, java.util.Map<Vertex,Vertex> variables)
public Vertex processConversational(Vertex input, Vertex sentence, Vertex conversation, java.util.Map<Vertex,Vertex> variables, Network network, Language.LanguageState state)
public Vertex synthesizeResponse(Vertex input, Vertex sentence, Vertex conversation, boolean random, java.util.Map<Vertex,Vertex> variables, Network network)
public java.lang.Boolean checkCondition(Relationship relationship, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex getDefaultResponse(java.util.List<Relationship> defaultResponses, Vertex input, Vertex sentence, Vertex conversation, java.util.Map<Vertex,Vertex> variables, Network network)
public Vertex checkDefaultResponseFormula(Vertex response, Vertex input, Network network, java.util.Map<Vertex,Vertex> variables)
public java.util.List<Vertex> importHTML(java.lang.String url, java.lang.String xpath, java.lang.String learningMode, Network network)
public Vertex getLastInputInConversation(Vertex conversation, Vertex speaker, int last)
public boolean shouldLearn(Vertex input, Vertex speaker)
public boolean shouldCorrect(Vertex input, Vertex speaker)
public Vertex allowCorrection(Vertex source, Vertex user)
public Vertex learn(Vertex source, Vertex question, Vertex response)
public Vertex learn(Vertex source, Vertex question, Vertex response, Vertex topic)
public Vertex synthesize(Vertex source, Vertex phrase)
public Vertex randomSynthesize(Vertex source, Vertex phrase)
public Vertex randomSynthesize(Vertex source)
public Vertex keywordIndexes(Vertex source, Vertex text, Vertex keywords)
public Vertex details(Vertex source, Vertex object)
public Vertex word(Vertex source, Vertex[] arguments)
public Vertex define(Vertex source, Vertex word, Vertex meaning)
public Vertex sentence(Vertex source, Vertex[] arguments)
public Vertex paragraph(Vertex source, Vertex text)
public Vertex getLastInput(Vertex source, Vertex conversation, Vertex speaker)
public Vertex getLastInput(Vertex source, Vertex conversation, Vertex speaker, Vertex index)
public Vertex getLastInput(Vertex source, Vertex conversation, Vertex speaker, Vertex index, Vertex part)
public Vertex processListening(Vertex input, Vertex sentence, Vertex speaker, Vertex conversation, java.util.List<Relationship> targets, Network network, Language.LanguageState state)
public int computeMaxSentenceValue(Vertex match, Vertex original, Network network)
public int computeWordValue(Vertex word)
public void recordSetenceValues(Vertex word, Vertex originalWord, java.util.Collection<Relationship> relationships, int value, Vertex sentence, java.util.Map<Vertex,java.lang.Integer> matches, java.util.Map<Vertex,java.util.Set<Vertex>> processed, Network network, java.util.List<Vertex> defer)
public void recordPatternValues(Vertex word, Vertex sentence, java.util.Map<Vertex,java.lang.Integer> matches, Network network, java.util.List<Vertex> defer)
public void addQuestionMatches(Vertex sentence, Network network, long startTime, long processTime, java.util.List<Relationship> wordRelations, java.util.Map<Vertex,java.lang.Integer> matches, java.util.Map<Vertex,java.util.Set<Vertex>> processed, Primitive key, boolean keywords)
public Relationship findResponseMatch(Vertex sentence, Vertex previousResponse, Vertex input, java.util.Map<Vertex,Vertex> variables, Network network, float percentage)
public void checkBetterMatch(java.util.Map.Entry<Vertex,java.lang.Integer> entry, java.util.Map<Vertex,java.lang.Integer> keyWordsMatches, java.lang.Object[] best, int tooBig, int tooSmall, int wordCount, float percentage, Vertex input, Vertex sentence, Vertex question, Vertex previousResponse, boolean cascade, boolean init, Vertex previousQuestion, java.util.Set<java.lang.String> questionWords, Vertex currentTopic, java.util.Map<Vertex,Vertex> variables, Network network)
public Relationship matchPattern(Vertex sentence, Vertex previousResponse, Vertex input, java.util.Map<Vertex,Vertex> variables, Network network, float percentage)
public Vertex processUnderstanding(Vertex input, Vertex sentence, float correctnessRequired, java.util.Map<Vertex,Vertex> variables, Network network)
public java.util.List<Vertex> processCompoundWords(java.util.List<Relationship> words)
public Vertex checkState(Vertex root, Vertex input, Vertex sentence, java.util.List<Vertex> states, int index, int recurse, java.util.List<Vertex> inputs, java.util.Map<Vertex,Vertex> variables, java.util.List<Vertex> stateStack, float correctnessRequired, Network network)
public Vertex[] bestAnswer(float percentage, Vertex state, java.util.Map<Vertex,Vertex> localVariables, Vertex input, Vertex sentence, Network network)
public boolean hasPrevious(Vertex meta, Vertex sentence, Vertex state, java.util.Map<Vertex,Vertex> localVariables, Network network)
public Vertex evaluateAnswerResponse(Vertex answer, Vertex state, java.util.Map<Vertex,Vertex> localVariables, Network network)
public Vertex createSentenceText(Vertex vertex, Network network)
public Vertex getWord(Vertex vertex, Network network)
public static Vertex getWordFollowing(Vertex vertex, Vertex previousWord, Vertex nextWord, Network network)
public static Vertex getWordFollowing(Vertex vertex, Relationship relationship, Vertex previousWord, Vertex nextWord, Network network)
public static java.lang.String printFragment(Vertex fragment, Vertex previousWord, Vertex nextWord, Network network)
public void setLastStateMachine(Vertex lastStateMachine)
public void setLastState(Vertex lastState)
public void setLastQuotient(Vertex lastQuotient)
public boolean getEnableEmote()
public void setEnableEmote(boolean enableEmote)
public java.lang.String getLanguage()
public void setLanguage(java.lang.String language)
public void loadSelfFile(java.io.File file, java.lang.String encoding, boolean debug)
public void loadSelfFile(java.net.URL url, java.lang.String encoding, boolean debug)
public void loadSelf(java.lang.String text, boolean debug, boolean optimize)
public void loadSelfFile(java.io.InputStream stream, java.lang.String encoding, int maxSize, boolean debug, boolean optimize)
public void loadAIMLFileAsLog(java.io.File file, java.lang.String encoding, boolean pin)
public void loadAIMLFile(java.io.File file, boolean createStates, boolean indexStatic, java.lang.String encoding)
public void loadAIMLFileAsLog(java.io.InputStream stream, java.lang.String encoding, int maxSize, boolean pin)
public void loadAIMLAsLog(java.lang.String text, boolean pin)
public void loadAIMLFile(java.io.InputStream stream, java.lang.String name, boolean createStates, boolean mergeState, boolean indexStatic, java.lang.String encoding, int maxSize)
public void loadAIML(java.lang.String text, java.lang.String name, boolean createStates, boolean mergeState, boolean indexStatic)