【发布时间】:2009-12-08 20:46:43
【问题描述】:
是否可以在模式中的术语之间使用通配符?例如,如果我想回答这个问题,“我的账簿上的逾期罚款是多少?”有没有办法在“过期”和“书籍”之间使用通配符?
【问题讨论】:
标签: pattern-matching aiml
是否可以在模式中的术语之间使用通配符?例如,如果我想回答这个问题,“我的账簿上的逾期罚款是多少?”有没有办法在“过期”和“书籍”之间使用通配符?
【问题讨论】:
标签: pattern-matching aiml
是的。执行以下操作:
<category>
<pattern>How much are overdue * on my books?</pattern>
<template><srai>YOUR <star/> IS</srai></template>
</category>
<category>
<pattern>YOUR FINE IS</pattern>
<template>Vote me up!</template>
</category
<category>
<pattern>YOUR STAMPS IS</pattern>
<template>20 pounds. Pay for this please.</template>
</category>
【讨论】:
我没有足够的布朗尼积分来回应 Bravax 的回答,而是通过解决所用句子的主题来增加解决方案。在英语中,人们通常会说,“我的账簿上有多少逾期罚款?”; “fines”是这里的星星,但 'Cat 正在寻找“fine”,所以 'Cat 不会看到它。
考虑将 'Cat's 2nd 模式从“你的罚款是”改为“你的罚款是”。其余的顺流而下。
【讨论】: