【发布时间】:2021-03-11 01:06:32
【问题描述】:
假设我希望用户对机器人的多个问候有一个单一的响应。有没有更好的方法来使用“或”语句或列表来编写这个,而不是用所有这样的模板写出每个案例来重定向模式?
<category>
<pattern> HELLO</pattern>
<template>
Hello User!
</template>
</category>
<category>
<pattern> HI</pattern>
<template>
<srai> HELLO</srai>
</template>
</category>
<category>
<pattern> HOWDY</pattern>
<template>
<srai> HELLO</srai>
</template>
</category>
【问题讨论】: