program-ab上的AIML:聊天机器人流程不适用于主题标签

时间:2018-10-02 10:25:46

标签: java chatbot aiml

感谢任何可以帮助我的人。我尝试在program-ab上运行以下AIML,但它不起作用。具体而言,它跳过“ step003”。谁能启发我什么地方出了问题?

没有错误,但是输入不断跳到下一步,并且结果输出与键入的输入不同。如果有人知道出了什么问题,那会很棒。谢谢。

<?xml version="1.0" encoding="UTF-8"?>
<aiml version="2.0">
<category>
    <pattern># Product engine #</pattern>
    <template>
<think><set name="topic">step001</set></think> 
What is your age bracket?
A: less than 17
B: 18-30
C: 31-60
D: more than 61
</template>
</category>

<topic name = "step001"> 
<category>
    <pattern>#</pattern>
    <template>
What is your income bracket per year?
A: less than 12000
B: 12001-30000
C: 30001-60000
D: more than 60000

    <think><set name="agebracket"><star/></set><set name="topic">step002</set></think> 
    </template>
</category>
</topic>

<topic name = "step002">
<category>
    <pattern>#</pattern>
    <that> # less than 12000 # </that>
    
    <template>
What is your total current loan ?
A: less than 100000
B: 100001-300000
C: 300001-600000
D: more than 600000

    <think><set name="incbracket"><star/></set><set name="topic">step003</set></think> 
    </template>
</category>
</topic>

<topic name = "step003">
<category>
    <pattern>#</pattern>
    <template>
agebracket=<get name="agebracket"/>
incomebracket=<get name="incbracket"/>
gender=M
curloanbracket=<set name="loanbracket"><star/></set>

</template>
</category>
</topic>
</aiml>

1 个答案:

答案 0 :(得分:0)

该代码有效。当我以前开始时,这是一个菜鸟错误。我忘记删除包含旧流的缓存文件。任何有兴趣做一些流程的人都可以使用该方法。谢谢。