English 中文(简体)
AIML - First Application
  • 时间:2024-11-05

AIML - First Apppcation


Previous Page Next Page  

让我们开始创建第一家机器人,只向用户Hellouser!。 用户类别Hello Albert/b>。

Create the Project Structure

>,《AIML环境设定》(),我们在C > ab中摘录了方案-ab的内容,其结构如下:

S.No. Directory & Description
1

c:/ab/bots

商店 AIML 机器人

2

c>/ab/pb

仓库库 Java图书馆

3

c>/ab/out

Java编

4

c:/ab/run.bat

批量文件

现在,在C > ab >bots

S.No. Directory & Description
1

c:ab/bots/test/aiml

AIML档案

2

c:ab/bots/test/aimpf

AIMLIF 档案

3

c:ab/bots/test/config

仓库组合文件

4

c:ab/bots/test/sets

AIML 一套

5

c:ab/bots/test/maps

AIML 地图

Create Source Files

C > ab > bots > test > aimingl和检测.aiml.csv(C > ab > bots > test > aimingpf.

test.aiml

<?xml version = "1.0" encoding = "UTF-8"?>
<aiml version="1.0.1" encoding = "UTF-8"?>
   <category>
      <pattern> HELLO ALICE </pattern>
      
      <template>
         Hello User
      </template>
      
   </category>
</aiml>

test.aiml.csv

0,HELLO ALICE,*,*,Hello User,test.aiml

Execute the Program

立即开放指挥。 Go to C > ab >和打下以下指挥系统:

java -cp pb/Ab.jar Main bot = test action = chat trace = false

Verify the Result

页: 1

Working Directory = C:ab

Program AB 0.0.4.2 beta -- AI Foundation Reference AIML 2.0 implementation
bot = test
action = chat
trace = false
trace mode = false
Name = test Path = C:ab/bots/test

C:ab
C:ab/bots
C:ab/bots/test
C:ab/bots/test/aiml
C:ab/bots/test/aimpf
C:ab/bots/test/config
C:ab/bots/test/logs
C:ab/bots/test/sets
C:ab/bots/test/maps

Preprocessor: 0 norms 0 persons 0 person2
Get Properties: C:ab/bots/test/config/properties.txt
addAIMLSets: C:ab/bots/test/sets does not exist.
addCategories: C:ab/bots/test/aiml does not exist.
AIML modified Tue Apr 07 22:24:29 IST 2015 AIMLIF modified Tue Apr 07 22:26:53 I
ST 2015
No deleted.aiml.csv file found
No deleted.aiml.csv file found
Loading AIML files from C:ab/bots/test/aimpf

Reading Learnf file
Loaded 1 categories in 0.009 sec
--> Bot test 1 completed 0 deleted 0 unfinished
(1[6])--HELLO-->(1[5])--ALICE-->(1[4])--<THAT>-->(1[3])--*-->(1[2])--<TOPIC>-->(
1[1])--*-->(0[null,null]) Hello User...
7 nodes 6 singletons 1 leaves 0 shortcuts 0 n-ary 6 branches 0.85714287 average
branching
Human:

<Hello>,见结果,然后除别的外,照样看变化的结果。

Human: hello apce
Robot: Hello User
Human: bye
Robot: I have no answer for that.
Human:
Advertisements