Artificial intelligence 使用<;那>;在AIML中使用*

Artificial intelligence 使用<;那>;在AIML中使用*,artificial-intelligence,bots,aiml,alice,Artificial Intelligence,Bots,Aiml,Alice,我试图让我的机器人问一个问题,然后根据答案回答。这个问题是随机的,以“你好吗?” <aiml version = "1.0.1" encoding = "UTF-8"> <category> <pattern>HI</pattern> <template> <random> <li>Hi! How are you?</li>

我试图让我的机器人问一个问题,然后根据答案回答。这个问题是随机的,以“你好吗?”

<aiml version = "1.0.1" encoding = "UTF-8">
   <category>
      <pattern>HI</pattern>
      <template>
          <random>
              <li>Hi! How are you?</li>
              <li>Hello there. How are you?</li>
              <li>Greeings. And how are you?</li>
          </random>
      </template>
   </category>

    <category>
        <pattern>GOOD</pattern>
        <that>* how are you?</that>
        <template>Happy to hear that.</template>
    </category>


    <category>
        <pattern>*</pattern>
        <template>Can you rephrase that?</template>
    </category>

</aiml>

你好
  • 嗨!你好吗
  • 你好。你好吗
  • 问候。你好吗
  • 好 *你好吗? 很高兴听到这个消息。 * 你能换个说法吗?

    如果我回答“好”,机器人将无法理解并回答“你能重新措辞吗?”

    尝试从
    that
    标记内的文本中删除问号。在AIML第1版中,所有模式和“that”标记应仅使用星号(*)下划线(389;)或大写文本。大写字母更多的是一种约定,而不是实际需求。

    您是否将此AIML文件与python代码一起用于传递输入?