AliceRobot
所属分类:xml/soap/webservice
开发工具:C#
文件大小:687KB
下载次数:124
上传日期:2009-03-05 14:54:33
上 传 者:
superstarlmm
说明: Aiml就是一个xml兼容的文本文档,使用AIML可以很好的与机器人进行交互. 已经实现了基本聊天对话,可以实现中英文聊天
(Xml compatible Aiml is a text document, use AIML can be very good interaction with the robot. Has achieved the basic chat dialogue, you can achieve in English and Chinese Chat)
文件列表:
Aiml机器人\AIMLBot\AIMLBot.csproj (5101, 2009-01-09)
Aiml机器人\AIMLBot\AIMLBot.csproj.user (2081, 2006-11-26)
Aiml机器人\AIMLBot\AIMLBot.sln (972, 2005-03-12)
Aiml机器人\AIMLBot\AIMLBot.suo (16384, 2005-05-12)
Aiml机器人\AIMLBot\AssemblyInfo.cs (3452, 2005-05-12)
Aiml机器人\AIMLBot\bin\Debug\AIMLBot.dll (94208, 2009-01-09)
Aiml机器人\AIMLBot\bin\Debug\AIMLBot.pdb (85504, 2009-01-09)
Aiml机器人\AIMLBot\bin\Debug\botplugs.dll (20480, 2009-01-09)
Aiml机器人\AIMLBot\bin\Debug\botplugs.pdb (22016, 2009-01-09)
Aiml机器人\AIMLBot\bin\Debug\Xunlong.NewNxuEncoding.dll (24576, 2009-01-09)
Aiml机器人\AIMLBot\bin\Debug\Xunlong.NewNxuEncoding.pdb (30208, 2009-01-09)
Aiml机器人\AIMLBot\bin\Release\AIMLBot.dll (90112, 2005-03-12)
Aiml机器人\AIMLBot\cAIMLLoader.cs (11608, 2006-11-27)
Aiml机器人\AIMLBot\cBot.cs (12787, 2006-11-29)
Aiml机器人\AIMLBot\cCategory.cs (4922, 2005-05-12)
Aiml机器人\AIMLBot\cGlobals.cs (35612, 2006-11-29)
Aiml机器人\AIMLBot\cGraphMaster.cs (4869, 2006-11-27)
Aiml机器人\AIMLBot\cNodeMapper.cs (11230, 2005-05-12)
Aiml机器人\AIMLBot\cNormalizer.cs (8998, 2006-11-29)
Aiml机器人\AIMLBot\cProcessor.cs (41631, 2006-11-29)
Aiml机器人\AIMLBot\cResponse.cs (4377, 2005-05-12)
Aiml机器人\AIMLBot\cUser.cs (4779, 2006-11-26)
Aiml机器人\AIMLBot\cUsers.cs (1699, 2005-05-12)
Aiml机器人\AIMLBot\doc\Thumbs.db (10752, 2005-05-10)
Aiml机器人\AIMLBot\LICENSE.txt (18320, 2005-03-11)
Aiml机器人\AIMLBot\obj\AIMLBot.csproj.FileList.txt (258, 2009-01-09)
Aiml机器人\AIMLBot\obj\Debug\AIMLBot.dll (94208, 2009-01-09)
Aiml机器人\AIMLBot\obj\Debug\AIMLBot.pdb (85504, 2009-01-09)
Aiml机器人\AIMLBot\obj\Debug\AIMLBot.projdata (223240, 2005-05-12)
Aiml机器人\AIMLBot\obj\Debug\ResolveAssemblyReference.cache (15938, 2009-01-09)
Aiml机器人\AIMLBot\obj\Release\AIMLBot.dll (90112, 2005-03-12)
Aiml机器人\AIMLBot\obj\Release\AIMLBot.projdata (57864, 2005-03-12)
Aiml机器人\AIMLBot\TODO.txt (2519, 2005-03-11)
Aiml机器人\AIMLGui\AIMLGui.cs (4273, 2009-01-09)
Aiml机器人\AIMLGui\AIMLGui.csproj (4484, 2006-11-28)
Aiml机器人\AIMLGui\AIMLGui.csproj.user (2109, 2006-11-26)
Aiml机器人\AIMLGui\AIMLGui.resx (5814, 2009-01-09)
Aiml机器人\AIMLGui\AIMLGui.sln (1375, 2006-11-26)
Aiml机器人\AIMLGui\AIMLGui.suo (8704, 2006-11-26)
... ...
AIMLBot - a C# library that implements ALICE (http://www.alicebot.org/)
This README file contains the following sections:
1. Author information
2. Project purpose / description.
3. Minimum requirements
4. Project directory structure
5. Usage instructions
6. Notice of GPL / copyleft
-----------------------------------------------------------------------
Author information
==================
First mention must go to Dr.Richard S.Wallace the inventor of AIML.
Second mention to the many free software developers who have already
implemented an AIML bot. The liberty to study how it was done was
much appreciated.
Finally, I (Nicholas H.Tollervey - http://www.ntoll.org/) coded this
as a first foray into the world of .NET in the spring of 2004 as part of
my work for Xmonic (http://www.xmonic.com/).
I hope you enjoy using and improving it.
Project description
===================
The document found at: http://www.alicebot.org/TR/2001/WD-aiml/ was used
as the vade mecum for this project. If you want to understand whats going
on I suggest you read it. For less formal information read on...
"AIML: Artificial Intelligence Markup Language
AIML (Artificial Intelligence Markup Language) is an XML-compliant language
that's easy to learn, and makes it possible for you to begin customizing an
Alicebot or creating one from scratch within minutes.
The most important units of AIML are:
*
: the tag that begins and ends an AIML document
* : the tag that marks a "unit of knowledge" in an Alicebot's
knowledge base
* : used to contain a simple pattern that matches what a user
may say or type to an Alicebot
* : contains the response to a user input
There are also 20 or so additional more tags often found in AIML files, and
it's possible to create your own so-called "custom predicates". Right now,
a beginner's guide to AIML can be found in the AIML Primer.
The free A.L.I.C.E. AIML includes a knowledge base of approximately 41,000
categories. Here's an example of one of them:
WHAT ARE YOU
Me
I am the latest result in artificial intelligence,
which can reproduce the capabilities of the human brain
with greater speed and accuracy.
(The opening and closing tags are not shown here, because this is
an excerpt from the middle of a document.)
Everything between and is -- you guessed it --
a category. A category can have one pattern and one template. (It can also
contain a tag, but we won't get into that here.)
The pattern shown will match only the exact phrase "what are you"
(capitalization is ignored).
But it's possible that this category may be invoked by another category,
using the tag (not shown) and the principle of reductionism.
In any case, if this category is called, it will produce the response
"I am the latest result in artificial intelligence..." shown above. In
addition, it will do something else interesting. Using the tag,
which causes Alicebot to perform whatever it contains but hide the result
from the user, the Alicebot engine will set the "topic" in its memory to
"Me". This allows any categories elsewhere with an explicit "topic" value
of "ME" to match better than categories with the same patterns that are
not given an explicit topic. This illustrates one mechanism whereby a
botmaster can exercise precise control over a conversational flow."
The above text is Copyright A.L.I.C.E. AI Foundation, Inc.
http://www.alicebot.org/
Minimum requirements
====================
Written and tested on .NET runtime v1.1
Also tested on Mono (http://www.mono-project.com/Main_Page)
Project directory structure
===========================
The directory structure of the or the AIMLBot project follows the
standard Visual Studio 2003 settings.
However, when the cBot class is instantiated for the first time
from within another program it searches for two directories in
the application's root directory:
* aiml - where you put the aiml files
* bots - where you put the DEFAULT.bot (predicate) file
(and in future versions any other bot settings files)
If these directories are not found the bot will attempt to create
them and populate them with a default predicate file and a copy
of the Salutations.aiml file (so your bot can at least say hello!).
Usage instructions
==================
To use in your own projects add the DLL as a reference. All the
classes are found under the AIMLBot namespace.
Instantiate the cBot class thus:
cBot myBot = new cBot(false);
or
cBot myBot = new cBot(PathToAIMLFiles,false);
The boolean value designates if debug mode is on. Setting this
to true will output lots of useful information to the console.
The time the cBot class takes to initialize, like all the other
AIML implementations, depends upon the number of Nodes to be read
and mapped into the cGraphmaster object. This can vary from a few
seconds to minutes. This is an area where the code can definitely
be made more efficient.
To chat to the bot simply call the "chat" method thus:
cResponse reply = myBot.chat(InputString,"Default");
The cResponse encapsulates all sorts of useful information about
how the "InputString" was processed.
To get the actual reply simply call the "getOutput" method:
Console.WriteLine(reply.getOutput());
And thats about it!
Read the TODO.txt document for information on what could be
improved about this implementation.
Notice of GPL / copyleft
========================
AIMLBot - An implementation of the AIML specification found at
http://www.alicebot.org/
Copyright (C) 2005 Xmonic (http://www.xmonic.com/)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
近期下载者:
相关文件:
收藏者: