Namespace: Conversive.Verbot4
(Important) Classes:
Reply
State
Verbot4Engine
Reply Class
Overview:
The reply object represents the results of a call to Verbot4Engine.GetReply.
Properties:
AgentText (string) - Text to be spoken (used with MS Agent)
Cmd (string) - Command text for the output
KBItem (KnowledgeBaseItem) - The KnowledgeBase that contains the matching rule
RuleId (string) - Id of the rule that fired
Text (string) - Output text to be displayed
Methods:
(nothing special, just those inherited from Object)
State Class
Overview:
One of the two main inputs to Verbot4Engine.GetReply. Represents the current state for the engine including: the last rule to fire, current variables values, and active KnowledgeBases.
Properties:
CurrentKBs (ArrayList) - ArrayList of strings that are the file paths to the active KnowledgeBases.
Lastfired (string) - Id of last rule to fire.
Lastinput (string) - Previous user input text.
LastRefreshedTime (DateTime) - The last time the state object was refreshed
Vars (Hashtable) - Hashtable representing the current engine variables.
Methods:
void LoadVars(string filepath) - Loads a set of variables from the given file.
void SaveVars(string filepath) - Saves the current State.Vars to the given file.
Verbot4Engine Class
Overview:
The core Verbot Engine. Is responsible for finding matches to a given user input and firing the appropriate rule.
Properties:
(none)
Methods:
CompiledKnowledgeBase AddCompiledKnowledgeBase(string stPath) - Loads a compiled KnowledgeBase from the given file path.
Reply GetReply(string input, State state) - Finds the best match in the available KnowledgeBase and fires the matching rule. The "input" parameter is the user's input text, and the "state" paramere is the user's current state.