您可能希望包含可以简化或重定向到另一个类别的基本/常见语音模式。以下是一些处理定义检索的示例。
<category>
<pattern>WHAT IS *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>DEFINE *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>WHAT IS A *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>DEFINE A *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>WHAT IS THE *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>DEFINE A *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>WHAT IS THE MEANING OF *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>DEFINE THE MEANING OF *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>WHAT IS THE DEFINITION OF *</pattern>
<template>
<sr/>
</template>
</category>
<category>
<pattern>DEFINE THE DEFINITION OF *</pattern>
<template>
<sr/>
</template>
</category>
与您的问题更相关的更有用的 AIML 代码行如下:
<category>
<pattern>HI *</pattern>
<template>
<srai>HI</srai>
</template>
</category>
<category>
<pattern>HELLO *</pattern>
<template>
<srai>HI</srai>
</template>
</category>
<category>
<pattern>ALOHA *</pattern>
<template>
<srai>HI</srai>
</template>
</category>
<category>
<pattern>HEY *</pattern>
<template>
<srai>HI</srai>
</template>
</category>