Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » General » Downloads
 
Add your own
alternative version

Building an AI Chatbot using a Regular Expression Engine

, 21 Jun 2007
This article describes how to build an AI Chatterbot using a popular, Regular Expression-based open source Chatterbot engine: Verbots
verbotsdk.zip
ResourceFiles
bin
Debug
ResourceFiles.dll
ResourceFiles.pdb
Release
ResourceFiles.dll
CHANGELOG
COPYING
mssccprj.scc
obj
Debug
buildinfo.inf
ResourceFiles.dll
ResourceFiles.pdb
ResourceFiles.projdata
temp
TempPE
Release
buildinfo.inf
ResourceFiles.dll
ResourceFiles.projdata
temp
TempPE
ResourceFiles.csproj.user
ResourceFiles.csproj.vspscc
vssver.scc
vssver2.scc
Verbot4Library
bin
Debug
Verbot4Library.dll
Verbot4Library.pdb
Release
Verbot4Library.dll
mssccprj.scc
obj
Debug
buildinfo.inf
temp
TempPE
Verbot4Library.dll
Verbot4Library.dll.incr
Verbot4Library.pdb
Verbot4Library.projdata
Release
buildinfo.inf
temp
TempPE
Verbot4Library.dll
Verbot4Library.projdata
Verbot4Library.csproj.user
Verbot4Library.csproj.vspscc
vssver.scc
vssver2.scc
VerbotConsoleApplication
App.ico
bin
Debug
Verbot4Library.dll
VerbotConsoleApplication.exe
VerbotConsoleApplication.pdb
Release
Verbot4Library.dll
VerbotConsoleApplication.exe
mssccprj.scc
obj
Debug
buildinfo.inf
temp
TempPE
VerbotConsoleApplication.exe
VerbotConsoleApplication.pdb
VerbotConsoleApplication.projdata
Release
buildinfo.inf
temp
TempPE
VerbotConsoleApplication.exe
VerbotConsoleApplication.projdata
VerbotConsoleApplication.csproj.user
VerbotConsoleApplication.csproj.vspscc
vssver.scc
VerbotWindowsApplicationSample
App.ico
bin
Debug
Verbot4Library.dll
Verbot4Library.pdb
VerbotWindowsApplicationSample.exe
VerbotWindowsApplicationSample.pdb
Release
Verbot4Library.dll
VerbotWindowsApplicationSample.exe
mssccprj.scc
obj
Debug
buildinfo.inf
temp
TempPE
VerbotWindowsApplicationSample.exe
VerbotWindowsApplicationSample.pdb
VerbotWindowsApplicationSample.projdata
Release
buildinfo.inf
temp
TempPE
VerbotWindowsApplicationSample.exe
VerbotWindowsApplicationSample.projdata
VerbotWindowsApplicationSample.VerbotWinApp.resources
Resources
sample.ckb
sample.vkb
vssver2.scc
VerbotWindowsApplicationSample.csproj.user
VerbotWindowsApplicationSample.csproj.vspscc
vssver.scc
vssver2.scc
<html>
<head>
    <title>Verbot Engine API Documentation</title>
</head>
<body>
<h2>Namespace: Conversive.Verbot4</h2>
<h3>(Important) Classes:</h3>
<br />
<a href="#class_reply">Reply</a><br />
<a href="#class_state">State</a><br />
<a href="#class_verbot4engine">Verbot4Engine</a><br />
<br />
<a name="class_reply"></a><h3>Reply Class</h3>
<b>Overview:</b><br />
The reply object represents the results of a call to Verbot4Engine.GetReply.<br />
<b>Properties:</b><br />
AgentText (string) - Text to be spoken (used with MS Agent)<br />
Cmd (string) - Command text for the output<br />
KBItem (KnowledgeBaseItem) - The KnowledgeBase that contains the matching rule<br />
RuleId (string) - Id of the rule that fired<br />
Text (string) - Output text to be displayed<br />
<br />
<b>Methods:</b><br />
(nothing special, just those inherited from Object)<br />
<br /><br />


<a name="class_state"></a><h3>State Class</h3>
<b>Overview:</b><br />
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.<br />
<b>Properties:</b><br />
CurrentKBs (ArrayList) - ArrayList of strings that are the file paths to the active KnowledgeBases.<br />
Lastfired (string) - Id of last rule to fire.<br />
Lastinput (string) - Previous user input text.<br />
LastRefreshedTime (DateTime) - The last time the state object was refreshed<br />
Vars (Hashtable) - Hashtable representing the current engine variables.<br />
<b>Methods:</b><br />
void LoadVars(string filepath) - Loads a set of variables from the given file.<br />
void SaveVars(string filepath) - Saves the current State.Vars to the given file.<br />
<br />


<a name="class_verbot4engine"></a><h3>Verbot4Engine Class</h3>
<b>Overview:</b><br />
The core Verbot Engine.  Is responsible for finding matches to a given user input and firing the appropriate rule.<br />
<b>Properties:</b><br />
(none)<br />
<b>Methods:</b><br />
CompiledKnowledgeBase AddCompiledKnowledgeBase(string stPath) - Loads a compiled KnowledgeBase from the given file path.<br />
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.
<br />

</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

About the Author

MattsterP
Web Developer
United States United States
Matt Palmerlee is a Software Engineer that has been working in the Microsoft.NET environment developing C# WebServices, Windows Applications, Web Applications, and Windows Services since 2003.

| Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 21 Jun 2007
Article Copyright 2007 by MattsterP
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid