AIML-主题-意外的答案与STAR(*)不匹配 [英] AIML - topic - unexpected answer does not match with STAR (*)

查看:69
本文介绍了AIML-主题-意外的答案与STAR(*)不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用AB.jar Google参考(alice)漫游器时:

When using the AB.jar Google reference (alice) bot:

使用此简单的简短脚本时:

When having this simple short script:

<category><pattern>TOPIC 1</pattern>
<template>Topic 2 with current topic '<get name="topic"/>'.<think><set name="topic">topic2</set></think></template>
</category>

<topic name="TOPIC2">
<category><pattern>YES</pattern>
<template>Going to topic3-yes <think><set name="topic">topic3-yes</set></think></template>
</category></topic>

<topic name="TOPIC2">
<category><pattern>*</pattern>
<template>Going to topic3-rest on '<star/>' <think><set name="topic">topic3-rest</set></think></template>
</category></topic>

...回答不是将不会导航到topic-3的 *模式。这是为什么?

... answering not 'yes' will not navigate to the topic-3 '*' pattern. Why is that?

这是对话。我用'//在这里标记了意外的答案

This is the conversation. I marked the unexpected answer with '// here'

Human : topic 1
Robot : Topic 2 with current topic 'unknown'.
Human : any
Robot : any is a name. // here -- expected to go to topic-3-rest


推荐答案

在主题内放置 _模式(而不是 *模式)可以回答问题。

Putting this '_' pattern (in stead of the '*' pattern) inside a topic answers the question.

感谢Ubercoder:

Thanks to Ubercoder:

该元素的优先级高于相同模式级别的其他模式。我不知道您使用的是AIML v1还是v2,但从广义上讲,它分为3种模式[但是请参见下面的说明]

The element takes priority over other patterns at the same pattern level. I don't know if you're using AIML v1 or v2, but broadly speaking there are 3 levels of patterns [but see note below]

Most important level = patterns including underscore wildcards (_)
Middle level = atomic patterns without any wildcards
Lowest level = patterns including star wildcards (*)

这篇关于AIML-主题-意外的答案与STAR(*)不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆